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.
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?
Joined: Mar 25, 2000
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.