After the character is destroyed, the memory is not released.

Thechuang

New member
I created a lot of UCC characters in the game. When destroying some characters, the memory is not released.

I used GameObject.Instantiate() to create many UCC characters, more than 100.
I used GameObject.Destroy() to destroy some or all of them, but the mono memory is never released.
 
An extensive caching system is used to make component lookup quick. You can clear the cache with UnityEngineUtility.ClearCache. This cache is automatically cleared when a new scene is loaded.
 
hey justin , thanks for your help, it's really kind of you.
I have try the UnityEnginieUtility.ClearCache method in my project,but the mono memory still not released.
Could you show me a demo or I should do some additianal excute for the cache?

the next problem is:
It is seems this method (unityEngineUtility.clearCache) is a new method in the new version of UCC, so is that mean the old version of UCC do not have the extensive caching system?
 
I have try the UnityEnginieUtility.ClearCache method in my project,but the mono memory still not released.
Could you show me a demo or I should do some additianal excute for the cache?
Can you use the profiler to see what is still within the cache?

It is seems this method (unityEngineUtility.clearCache) is a new method in the new version of UCC, so is that mean the old version of UCC do not have the extensive caching system?
Prior versions did have the same caching system, just no easy way to clear it.
 
Can you use the profiler to see what is still within the cache?


Prior versions did have the same caching system, just no easy way to clear it.
1575342337421.png
1575342384245.png
1575343348061.png

When I destroy those UCC characters, these still exist, even if I switch scenes.
I guess the state has not been completely cleared. Is there a way to clear it?
 
Those states are likely from other components (such as the camera). I'll take a closer look at this and ensure everything is being cleaned up properly.
 
Those states are likely from other components (such as the camera). I'll take a closer look at this and ensure everything is being cleaned up properly.

thank you for your time!
I will dig deep in this issue and sync my progress with you.
If you get more info please let me know. thanks
 
Top