Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: markofevil3 on January 22, 2014, 04:30:04 AM

Title: TextMesh memory leak
Post by: markofevil3 on January 22, 2014, 04:30:04 AM
When destroy or hide UILabel, textmesh does not destroy
Profile when start NGUI
(https://dl.dropboxusercontent.com/u/86872228/NGUI_Start.png)

Profile after create some UI
(https://dl.dropboxusercontent.com/u/86872228/NGUI_Create%20some%20ui%20objects.png)

Profile after delete all UI
(https://dl.dropboxusercontent.com/u/86872228/NGUI_AfterDeleteAllObjects.png)
Title: Re: TextMesh memory leak
Post by: markofevil3 on January 22, 2014, 04:33:08 AM
Note: im using unity 4.3.0, NGUI 3.0.9f3
Title: Re: TextMesh memory leak
Post by: ArenMook on January 22, 2014, 05:04:25 AM
TextMesh is a Unity class and has nothing to do with NGUI.
Title: Re: TextMesh memory leak
Post by: markofevil3 on January 22, 2014, 05:59:37 AM
the HD_UI(NGUI atlas) and font material are also leaked. after deleted all UI, they does not reduce too.
Title: Re: TextMesh memory leak
Post by: ArenMook on January 22, 2014, 06:06:30 AM
Of course the atlas will stay. Atlas is a prefab. Once you use it, it will be in memory unless you call UnloadUnusedAssets(). Even so I'm not sure if it will work unless you actually load it first using Resources.Load.

I suggest you consult Unity's documentation on how and when it unloads assets.

https://docs.unity3d.com/Documentation/ScriptReference/Resources.UnloadUnusedAssets.html