I have a simple question hopefully - how does one free memory which was allocated in the try block when the exception occurs? Consider the following code:
try {
Yes - if you are considering the simplicity - pointer that is outer to your try block is the solution.
Regards