On 09/30/2010 05:42 PM, Boroondas Gupte wrote: > On 09/24/2010 01:58 PM, Boroondas Gupte wrote: >> 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. > > Filed as VWR-23239 <https://jira.secondlife.com/browse/VWR-23239>. Proposed a fix <http://bitbucket.org/boroondas/vwr-23239/changeset/fe39642ec7a8> a week ago, but looks like this didn't get a lot of attention, yet. The fix might look simple and straight forward, but both, the potential leak and this fix are difficult to test for. (E.g. adding a static instance counter to LLFormatMapString and outputting its value in the constructors and the destructor of LLFormatMapString didn't lead to conclusive results. Maybe objects of the same type are being leaked elsewhere, too.) So code review is essential here.
Cheers, Boroondas
_______________________________________________ Policies and (un)subscribe information available here: http://wiki.secondlife.com/wiki/OpenSource-Dev Please read the policies before posting to keep unmoderated posting privileges