Bookmark Topic Watch Topic
  • New Topic

finalize() use

 
Devu Shah
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hello,
I have one doubt.
I am using VERY BIG Help file in JEditorPane ( to show online help) as follow.
URL url = ClassLoader.getSystemResource(fileName);
pane = new JEditorPane(url);
..................
.................
Now,to free up non java resource, what should I make null, in finalize method, ?
should it be url ?
or pane ?
i.e. should it be url = null;
or pane = null; in finalize method.
thanks
Devu
 
Ricardo Polero
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Report post to moderator
If you call dispose() in the "Exit" buttom in the gui , will release all the child window include the help !
Ricardo
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Report post to moderator
This has been posted to at least one other group (Java in General (Advanced)) and doesn't look like it relates specifically to the Developer's certification, so if you don't mind I'll close it here.
Please don't post in more than one forum. Thanks.
- Peter
 
    Bookmark Topic Watch Topic
  • New Topic