How to clear the memory allocated for Customized Exception

Posted by ilan on Stack Overflow See other posts from Stack Overflow or by ilan
Published on 2009-02-17T13:03:26Z Indexed on 2010/04/12 18:03 UTC
Read the original article Hit count: 295

Filed under:
|

Hi All

I have a customized exception class. say class CustomExcep{};

My Application is a middleware made of C++. It is a webservice which is used for the communication between Java based web Front-end and the DCE Backend.

whenever the DCE Backend is not running or down due to some core dumps, the application throws the CustomExcep.

It's like this.

CustomExcep * exc = new CustomExcep(); throw exc;

I am unable to use the stack memory for this as it leads to some run-time exceptions.

I need a solution to clear the memory used by this CustomException. Can we use Templates for this purpose?

Any help would be appreciated. Thanks in Advance.

© Stack Overflow or respective owner

Related posts about exception

Related posts about memory-leaks