Hi all,
I've create an exception class which I intend to use in my code (VC++ 2005). When I want to raise an exception, I create a new instance of object of this class, and throw it. Then the calling app should use try/catch mechanism to catch this exception, and call its Delete() function (just delete won't work). I was wondering whether there is a way to make this object self-deleting for cases where the calling app forgot to call its Delete() function, or it didn't bother to catch those exceptions. Besides all this, its a good programming practice. I couldn't come up with something working, although from what I've seen MFC does have self-deleting exceptions.
Any idea, anyone?
Stilgar.
Start Free Trial