Thread View: aus.computers.java
2 messages
2 total messages
Started by Per Petersson
Thu, 13 Apr 2000 00:00
Does the destructor allways run
Author: Per Petersson
Date: Thu, 13 Apr 2000 00:00
Date: Thu, 13 Apr 2000 00:00
10 lines
1009 bytes
1009 bytes
I've got the impression that the finalize method doesn't run if the object dies on program termination. What I mean is that if I have an object and then do System.exit() somewhere the finalize method of that object doesnt run . Could someone please say that I'm wrong (or right). P.S. I'm running JDK1.3 Beta on Win NT 4.0 System Thanks for any comments on this. Per
Re: Does the destructor allways run
Author: Paul Murray
Date: Fri, 14 Apr 2000 00:00
Date: Fri, 14 Apr 2000 00:00
20 lines
1435 bytes
1435 bytes
"Per Petersson" <pt98ppe@student.hk-r.se> wrote in message news:OqmJ4.85$7j.35014@newnews.hk-r.se... > I've got the impression that the finalize method doesn't run if the object > dies on program termination. > What I mean is that if I have an object and then do System.exit() somewhere > the finalize method of that object doesnt run . > > Could someone please say that I'm wrong (or right). Yes, that's right. Finalizers are not guarinteed to be run. You can call System.runFinalizersOnExit(true) to force it, but that's a deprecated method because of security hassles or something. -- -------------------------------------------------------------- http://www.users.bigpond.com/pmurray ICQ: 26066755
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads