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 {
The easiest way would be to declare the variable before the try block, and then just do the initialization within the block.