• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

developing plugin system

 
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to develop a simple plugin system. This system will allow plugins to be started and stopped. I am concerned about what to do when the plugin is stopped. What do I need to do in order to tell the JRE that the stopped plugin can be garbage collected when the JRE is ready to do it? Or do I just not do anything and let the JRE figure out that I'm not using it anymore and it can be GC'd?
I know that you cannot force GC of an object.
 
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Normally, I like to set the variable to null once I'm finished with it. Part of Java's GC is just what we are talking about. The JRE keeps up with variables and destroy's them we they will not be needed again.
On a different note, I'm curious as to what you mean by plugin system. Could you explain your plans a little more?
 
Frank Hale
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I was just playing around and decided to have a JFrame with a JDesktopPane. I thought it would be cool to implement a plugin system which the plugins took the form of a JInternalFrame. So that it appeared to be like a desktop that you could load different apps into. Each app would be a plugin in this desktop app.
I know there are already apps out there like this but I am just really messing around to get back into Java programming. I've been messing around with this language since it came out but never really got serious about it. Now I'm trying to get serious and get certified one day as well.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic