Skip to content

Commit 910d6a1

Browse files
committed
fix: memory leak without domain reload
playModeStateChanged never gets unsubscribed
1 parent 024f67a commit 910d6a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,6 +1629,10 @@ private void OnDestroy()
16291629
{
16301630
Singleton = null;
16311631
}
1632+
1633+
#if UNITY_EDITOR
1634+
EditorApplication.playModeStateChanged -= ModeChanged;
1635+
#endif
16321636
}
16331637

16341638
// Command line options

0 commit comments

Comments
 (0)