• Post Reply Bookmark Topic Watch Topic
  • New Topic

Regarding references and garbage collecting

 
Mark Herreras
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a swing prog with an exit menu item, so when the user clicks exit

the only code in it is a call to System.exit(0);
But after starting and restarting the prog a lot of times
my machine tend to slow...
Is this an issue with references, do i need to null all references
before calling exit?

Thanks!
 
Ken Blair
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once the JVM exits the resources should be freed, so whether or not you had memory leaks shouldn't matter.
 
Mark Herreras
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
um, i'm still a little confused.
Does a call to System.exit mean that the program is terminated? or does it mean that both the program and JVM are terminated?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!