This is my class
class ExceptionClass
{
public void throwException() throws Exception
{
throw new Exception();
}
}
And I have compiled its .class, .o and .h files
Now in my main I have included it <gcj/cni.h> and <ExceptionClass.h> also
JvCreateJavaVM(NULL);
JvAttachCurrentThread(NULL,NULL); in the begining and
JvDetachCurrentThread(); in the end
Problem here is in I have a while loop which runs indefinitely and goes on
creating
ExceptionClass objects and each invokes above throwException method. And
everytime that method gets invoked a new Exception object is created which
leads to memory leak because I am not able to delete it from main (or could
say deleting doesn't help). How can I stabilize the memory utilization.