I've begun playing with MBeans for exposing some information about an app. Pretty much the totality of HOWTOs / Tutorials / Blog posts / Samples online teach you how to implement an MBean and register it with an MBean Server, but never mention (or only cursorily) unregistering the MBean from the server.
I'm concerned about an MBean that needs to have a reference to a fairly heavyweight object in order to provide status information about that object.
Does the Platform MBean Server maintain a weak reference to the MBean, or some other such trick, to ensure that it eventually gets GC'ed if your application no longer holds any references to it? Is unregistering generally unnecessary, thereby explaining why no one is talking about it in JMX tutorials?