hansaplast
Programmer
Please consider the folowing:
When the programm runs and CTRL+C is pressed, clss is not deleted thus creating a leak.
How can I avoid this? I tried 'try' and 'catch' but that doesn't seem to work.
Whatever you do will be insignificant, but it is very important that you do it.
(Mahatma Gandhi)
Code:
main ()
{
MyClass *clss = new MyClass;
//.. some code ..//
delete clss;
}
How can I avoid this? I tried 'try' and 'catch' but that doesn't seem to work.
Whatever you do will be insignificant, but it is very important that you do it.
(Mahatma Gandhi)