DestroyImmediate和Destroy

DestroyImmediate immediately and removed from memory pairs like destruction;

Destroy destroy objects in the scene, but are still in memory, when in season it needs to be destroyed, just give an identity. The memory of it still exists, only when the memory is not enough, or a period of time not referenced again (or more reasonable conditions are met), the mechanism will destroy it and free the memory.
The aim is to avoid frequent memory read and write operations. Collector will clean up the timing of a memory reference count for the object 0, it is likely your target to be destroyed as well as a reference and you do not know anywhere else, could lead directly to destruction elsewhere null reference error.
----------------
Disclaimer: This article is the original article CSDN bloggers "Bliss troubled times Y", and follow CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source and link this statement.
Original link: https: //blog.csdn.net/dicunsi2939/article/details/78212152

Guess you like

Origin www.cnblogs.com/mcyushao/p/11589741.html