If you go into the java-specification you will notice that there is no guarantee that
the finalize() method will actually be called by the gc. If you want to make sure
finalize is executed put it in a different method and call it from a finally block.
SOemthing like this
void myfinalizer()
{
// code goes here
}
// this is the actually closing code
try
{
// some code that exits the program/session
}
finally
{
myfinalizer();
}
Hope that helps
STefan
- Finalization of session attribute Artur Radosz
- Re: Finalization of session attribute Stefan Langer
- Re: Finalization of session attribute Artur Radosz
- Re: Finalization of session attribute William Brogden
- Re: Finalization of session attribute Artur Radosz
