• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

class unloading

 
Ewald Geschwinde
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a short question about this topic.
I need to unload classes that are dynamically loaded.
I found many examples where classes are dynamically loaded but not unloaded.
Can anyone point me to a good example or tutorial about this topic?
 
shankar vembu
Ranch Hand
Posts: 309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i never came across a situation where I had to unload classes. And is there a way to do it? I am not sure..... And what makes you to unload the classes? Can you be specific abt your requirement? maybe there is a workaround...
shankar
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To unload a class, first you have to load the class using a ClassLoader you created -- i.e., not the built-in one. Then to unload a class, make sure there are no instances of the class that are reachable, and then dispose of that ClassLoader. The class itself is now eligible for garbage collection.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic