- Auto ss= director::getinstance ()->gettexturecache ()->getcachedtextureinfo ();
- Log ("%s", Ss.c_str ());
"/users/yannei/library/application Support/iphone simulator/7.1/applications/ 1fb2a229-f755-4e39-887d-3057c3a692ec/baoweiluobo ios.app/pets/petstheme06-hd.png "rc=51 id=8 861 x 248 @ 834 BPP Kb
"/users/yannei/library/application Support/iphone simulator/7.1/applications/ 1fb2a229-f755-4e39-887d-3057c3a692ec/baoweiluobo ios.app/pets/petstheme03-hd.png "rc=51 id=7 225 x 1003 @ 88 BPP 1 KB
"/users/yannei/library/application Support/iphone simulator/7.1/applications/ 1fb2a229-f755-4e39-887d-3057c3a692ec/baoweiluobo Ios.app/towers/tower9.pvr.ccz "rc=13 id=19 x 2048 @ 409 BPP 6 KB
"/users/yannei/library/application Support/iphone simulator/7.1/applications/ 1fb2a229-f755-4e39-887d-3057c3a692ec/baoweiluobo Ios.app/item/item1.pvr.ccz "rc=141 id=3 x 2048 @ + BPP = 4096 KB
Texturecache dumpdebuginfo:33 textures, for 76980 KB (75.18 MB)
These logs show the texture's name, reference number, ID, size, and the bit value of the pixel, and most importantly it shows the memory usage. Consumes 75.18 MB of memory.
The "RC" here represents the "reference count" of the texture. If the reference count is equal to 1 or 2, then it means that the texture may not be used at this time, so you can safely remove it from the texture cache.
COCOS2DX Game Memory usage information analysis