cbpporter Messages: 1427 Registered: September 2007
Ultimate Contributor
tojocky wrote on Thu, 04 August 2011 11:21
Hello,
If in the base class is not set virtual destructor, and detect memory leak in example of Koldo, is this a bug?
In my case on win32 and linux 32 (ubuntu 11.04) have the same behavor (memory leak).
Regards,
Ion.
I say it is a programming error. Without he virtual destructor, the compiler can't free the cal the destructor of the string from StringNumber. It will always call the destructor for type T, in this case Number.