ListboxTextItem: Memory Leak?

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

User avatar
mac
Just popping in
Just popping in
Posts: 16
Joined: Wed Jan 12, 2005 12:06

ListboxTextItem: Memory Leak?

Postby mac » Sat Aug 07, 2004 12:20

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!

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

ListboxTextItem: Memory Leak?

Postby CrazyEddie » Sat Aug 07, 2004 12:41

Thanks mac,

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

CE.

User avatar
mac
Just popping in
Just popping in
Posts: 16
Joined: Wed Jan 12, 2005 12:06

ListboxTextItem: Memory Leak?

Postby mac » Sat Aug 07, 2004 13:03

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! :)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

ListboxTextItem: Memory Leak?

Postby CrazyEddie » Sat Aug 07, 2004 14:33

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.

User avatar
mac
Just popping in
Just popping in
Posts: 16
Joined: Wed Jan 12, 2005 12:06

ListboxTextItem: Memory Leak?

Postby mac » Mon Aug 09, 2004 12:43

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

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

ListboxTextItem: Memory Leak?

Postby CrazyEddie » Mon Aug 09, 2004 18:39

: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.


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 5 guests