|List:||MySQL++||« Previous MessageNext Message »|
|From:||Warren Young||Date:||November 26 2007 8:58pm|
|Subject:||Re: Is method "const ColData Row::at(size_type i) const" leaking|
|View as plain text|
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<const_string> 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<const_string> object goes away, ~const_string() should be called, freeing up the memory.