Clear references holding on to types in game assemblies

This commit is contained in:
2024-04-22 23:55:39 +03:00
committed by Ari Vuollet
parent 691b9458ec
commit 9f8faf4f17
5 changed files with 20 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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

View File

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