[opensource-dev] New memory leak in LLUIString ?

Boroondas Gupte sllists at boroon.dasgupta.ch
Fri Sep 24 04:58:14 PDT 2010


 Looking through recently merged commits, I noticed that changeset
80af8db446df changes
<http://bitbucket.org/lindenlab/viewer-development/changeset/80af8db446df#chg-indra/llui/lluistring.h_newline113>
LLUIString::mArgs into a pointer. This pointer gets initialized with a
new object in one of the constructors
<http://bitbucket.org/lindenlab/viewer-development/changeset/80af8db446df#chg-indra/llui/lluistring.cpp_newline41>
(the other constructors set it to NULL), or lazily (i.e. when still NULL
when an actual object is required) through LLUIString::getArgs()
<http://bitbucket.org/lindenlab/viewer-development/changeset/80af8db446df#chg-indra/llui/lluistring.cpp_newline161>.

Though I can't seem to find where mArgs gets deleted again. Is it being
leaked?

As far as I can see, mArgs (which is private) doesn't get assigned any
pointers from outside the LLUIString instance and is never passed out
through any method, so it should be save to delete it in the destructor
of LLUIString.

Am I missing something obvious?
Cheers,

Boroondas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/opensource-dev/attachments/20100924/4d423fc4/attachment.htm 


More information about the opensource-dev mailing list