mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix: NetworkIdentity.OnDestroy cyclic memory leak
This commit is contained in:
parent
d0f7dbdb20
commit
6da8ec80a3
@ -682,6 +682,11 @@ void OnDestroy()
|
||||
// fixes: https://github.com/MirrorNetworking/Mirror/issues/3324
|
||||
NetworkClient.spawned.Remove(netId);
|
||||
}
|
||||
|
||||
// workaround for cyclid NI<->NB reference causing memory leaks
|
||||
// after Destroy. [Credits: BigBoxVR/R.S.]
|
||||
// TODO report this to Unity!
|
||||
this.NetworkBehaviours = null;
|
||||
}
|
||||
|
||||
internal void OnStartServer()
|
||||
|
Loading…
Reference in New Issue
Block a user