Fix: Properly destroy Scene in MapWorld to prevent memory leak

This commit is contained in:
Patrick Jr.
2025-12-02 02:57:08 +00:00
committed by Matt Stevens
parent db6ca66000
commit 18ec2c5b55

View File

@@ -111,7 +111,11 @@ public sealed class MapWorld : MapNode
base.OnNativeDestroy();
worldNative = default;
Scene = default; // FIXME: Dispose
if ( Scene.IsValid() )
{
Scene.Destroy();
Scene = null;
}
EditorSession?.Destroy();
EditorSession = null;