Full GuiTexture-based user interface memory leak

Hi,

I’ve made a systeme wich instantiante a whole GUI based on a xml and some png (used as Texture2D) loaded as an input. The GUI is made only with GUIText and GUITexture.

It’s working perfectly fine, I can change my whole interface only by editing my xml file. The point is, I want to optimize the size cost of my interface. All the pictures are in ARGB32 and that sucks.

I tryed to create power of 2 textures, load my images into these power of 2 textures, and compress the Texture2D (using like “texture.Compress”). But image lost a lot of quality. Is there anyway to reduce the image memory size ? (they all contain alpha …). The whole GUI is like … 280 mo right now (original png files are like 2.75 mo)

Also, I think there is a memory leak. When I run my game in the editor with a memory consumption of 200 mo, after the interface is created if I stop my game, the memory of the editor is aroud 350. After 4hours of work, it’s like 1.4 go … It’s not always increasing with the same amount, but it’s increasing. I guess it’s my fault. So I was wondering if there is a tool (like the Profiler) wich is able to list the texture currently in RAM (maybe I’m dreaming ^_^)

Thanks !

Actually, I have a big texture that containt all my elements. Then I split it into small textures and I destroy the big one. (I do that because the big picture is made with a php script that is not really efficiant so there is a lot of transparent spaces that might cost a lot in memory). Do you think that I should keep my big texture in memory instead of spliting it ?

I’ll take a deep look into the GUI systems you talked about !

Thanks again !