Page 1 of 1

ListboxTextItem: Memory Leak?

Posted: Sat Aug 07, 2004 12:20
by mac
Hi CE,

the Ogre memory manager reports a memory leak for each creation of a ListboxTextItem. By default objects like these should be deleted automatically (auto_delete = 1).

Code: Select all

ListboxTextItem* item = new ListboxTextItem( (utf8*)"test");
// or even
ListboxTextItem* item = new ListboxTextItem( (utf8*)"test", 0, 0, 0, 1);


Am I using it the wrong way?
I'm using the Ogre renderer (you may have guessed...) and a current cvs version.

Bye,
mac

PS: Thanks for providing the great CEGUI!

ListboxTextItem: Memory Leak?

Posted: Sat Aug 07, 2004 12:41
by CrazyEddie
Thanks mac,

Your usage is correct. The problem is that sometimes I suck :roll: I'll get this fixed sometime later today :)

CE.

ListboxTextItem: Memory Leak?

Posted: Sat Aug 07, 2004 13:03
by mac
You are so quick... thank you!

Bye,
mac

PS: You don't suck - it's a big piece of software and has very few bugs, taking into acount the relatively short time of development... In all: you rock! :)

ListboxTextItem: Memory Leak?

Posted: Sat Aug 07, 2004 14:33
by CrazyEddie
Thanks for your kind words :twisted:

I have committed the fix for this to CVS, along with a fix for a leak in the texture system, plus other minor things. Allow 5 hours for anonymous CVS access to sync.

ListboxTextItem: Memory Leak?

Posted: Mon Aug 09, 2004 12:43
by mac
Cool that you also fixed the other leaks!

For the first time I get: "Congratulations! No memory leaks found!" - which always gives me a good feeling :)

Thanks again,
mac

ListboxTextItem: Memory Leak?

Posted: Mon Aug 09, 2004 18:39
by CrazyEddie
:D

There is still one known issue with resource / memory management that Spoke reported to me; if you have two imagesets that use the same texture / image file, or it you use a texture for an imageset that is used elsewhere (that is, maybe CEGUI did not cause it's creation), then attempts will be made to free the texture(s) more than once - with disasterous results :) I do intend to resolve this issue (obviously), but for now, everyone should not try any tricks with textures :evil:

CE.