Merge pull request #59671 from dnikolaidis2/fix-canvas-group-memory-leak

Fix canvas_group not being freed in RendererCanvasCull::free
This commit is contained in:
Rémi Verschelde 2022-03-29 23:36:50 +02:00 committed by GitHub
commit 0731d0d777
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1664,6 +1664,11 @@ bool RendererCanvasCull::free(RID p_rid) {
}
*/
if (canvas_item->canvas_group != nullptr) {
memdelete(canvas_item->canvas_group);
canvas_item->canvas_group = nullptr;
}
canvas_item_owner.free(p_rid);
} else if (canvas_light_owner.owns(p_rid)) {