Clear references holding on to types in game assemblies

This commit is contained in:
2024-04-22 23:55:39 +03:00
parent 48fa41fc58
commit e573703c4a
5 changed files with 20 additions and 0 deletions

View File

@@ -192,6 +192,15 @@ namespace FlaxEditor.CustomEditors
Presenter.AfterLayout?.Invoke(layout);
}
/// <inheritdoc />
protected override void Deinitialize()
{
Editor = null;
_overrideEditor = null;
base.Deinitialize();
}
/// <inheritdoc />
protected override void OnModified()
{

View File

@@ -1029,6 +1029,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
protected override void Deinitialize()
{
_scriptToggles = null;
_scripts.Clear();
base.Deinitialize();
}

View File

@@ -799,6 +799,14 @@ namespace FlaxEditor.CustomEditors.Editors
OnGroupsEnd();
}
protected override void Deinitialize()
{
_visibleIfCaches = null;
_visibleIfPropertiesListsCache = null;
base.Deinitialize();
}
/// <inheritdoc />
public override void Refresh()
{

View File

@@ -469,6 +469,7 @@ namespace FlaxEditor.SceneGraph
{
ChildNodes[i].OnDispose();
}
ChildNodes.Clear();
SceneGraphFactory.Nodes.Remove(ID);
}

View File

@@ -118,6 +118,7 @@ namespace FlaxEngine.GUI
// Unlink
IsLayoutLocked = true;
Parent = null;
_showTarget = null;
// Close window
if (_window)