mirror of
https://github.com/Facepunch/sbox-public.git
synced 2025-12-23 22:48:07 -05:00
Fix: Properly destroy Scene in MapWorld to prevent memory leak
This commit is contained in:
committed by
Matt Stevens
parent
db6ca66000
commit
18ec2c5b55
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user