From: Warren Young Date: November 26 2007 8:58pm Subject: Re: Is method "const ColData Row::at(size_type i) const" leaking memory? List-Archive: http://lists.mysql.com/plusplus/7182 Message-Id: <474B336D.7020001@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Thunder0 wrote: > > (const_string.h:110)==10964== Try making ~const_string() virtual and rebuilding. I don't really expect that to fix it, because if it does, it means someone somewhere is holding references to ColData objects by pointers to the base class and deleting them through that pointer. That shouldn't be happening, because as far as I know, everyone keeps ColData objects as ColData. (This lack of use of the is-a property of inheritance is one reason why ColData no longer uses inheritance in v3.) If, as seems more likely, making the base class dtor virtual doesn't help, I'm at a total loss. You can clearly see in const_string.h that memory allocated in the ctors gets deallocated in the dtor. When a ColData_Tmpl object goes away, ~const_string() should be called, freeing up the memory.