Unity3d There are three steps in the process of creating instances dynamically
Assetbundle.loadfromfile created is the Assetbundle file memory image bundle
Bundle. Loadasset is creating a asset memory image asset
Instantiate (asset) creates an instance object Gameobject
So it corresponds to the generation and release of these three generated objects.
Gameobject
Instantiate (asset) generates Gameobject
Destroy (Gameobject) Destroy Gameobject
Asset
Bundle. Loadasset creating a asset memory image
Reources.unloadasset (asset) Release asset memory image
Resources.unloadunusedassets () frees asset that are not referenced
(Policy, do not want to release the asset, keep the asset reference, call Unloadunusedassets to uniformly release the asset you want to release)
Bundle
Assetbundle.loadfromfile Creating a bundle file memory image
Bundle. Unload (FALSE) release bundle file memory image
(after all asset have been created, the bundle is called.) Unload (False))
Scene toggle destroys all gameobject, clears references to asset memory images, but does not include memory images of assetbundle files themselves
Unity3d resource load and release memory management