I have been struggling with this one for whole morning. not being able to test on devices yet, i rely on what profiler shows only to roughly see there are no major issues. One of which I consider as serious is the fact that whenever I create 2D texture either in Cocos2d or in custom code - directly supplying openGL, I have in profiler all my textures are displayed as two allocations.
E.g. when I create a texture 512x512x4 which is roughly 1MB of data, my live bytes usage jumps by 2MB and I can see in list of live objects two heavy blocks of memory 1Mb each - exactly as my texture.
And let me stress that point - this is NOT a raw image file I supplied to the glTexImage2D(), which gets deleted in the destructor and I have checked it many times. Also the problem I observed also in Cocos2d example projects - simple all the memory for textures is doubled.
below two screeshots - one from cocos2d app , shows two textures 600KB each displayed in the profiler as FOUR allocated objects :
and custom allocated and created texture directly with openGL and image supplied via libpng - displayed as live two objects 1Mb each.
I would appreciate if anyone could enlighten me on this one. Perhaps in the device situation looks different.
Regards, s.