C
Christian Christmann
Hi,
in my source code I've included a library I've not written and source code
is available.
In a function, I've generate an object of that library class dynamically
with "new" and at the function's end I want to freed memory for that
object with "delete". However, doing that seem to be not allowed since
I get the compiler error:
error: `virtual LibraryClass::~LibraryClass()' is protected
myfile.cc:1000: error: within this context
Any ideas what to do in order to avoid memory leaking?
Regards,
Chris
in my source code I've included a library I've not written and source code
is available.
In a function, I've generate an object of that library class dynamically
with "new" and at the function's end I want to freed memory for that
object with "delete". However, doing that seem to be not allowed since
I get the compiler error:
error: `virtual LibraryClass::~LibraryClass()' is protected
myfile.cc:1000: error: within this context
Any ideas what to do in order to avoid memory leaking?
Regards,
Chris