jbossas/jboss-msc — pull request #24 by ctomc (2013-07-14 21:19:44+00:00)
Title: Potential fix for not cleaning up canceled services

Controllers don't get removed from StabilityMonitor in case state of service is canceled and not removed.
For mode = REMOVE

I am not sure this fix is appropriate at all but it does solves leak.

example of memory leak from yourkit
```
+---------------------------------------------------------------------------------------------------------------+-----------------+----------------+
| Name | Retained Size | Shallow Size |
+---------------------------------------------------------------------------------------------------------------+-----------------+----------------+
| +---org.jboss.as.server.deployment.DeploymentUnitPhaseService | 152 | 32 |
| | | | |
| +---value of org.jboss.msc.value.ImmediateValue | 168 | 16 |
| | | | |
| +---serviceValue of org.jboss.msc.service.ServiceControllerImpl | 5.432 | 112 |
| | | | |
| +---parent of org.jboss.msc.service.ServiceControllerImpl | 6.256 | 112 |
| | | | |
| +---parent of org.jboss.msc.service.ServiceControllerImpl | 602.744 | 112 |
| | | | |
| +---parent of org.jboss.msc.service.ServiceControllerImpl | 704 | 112 |
| | | | |
| +---[275] of java.lang.Object[512] | 607.904 | 2.064 |
| | | | |
| +---table of org.jboss.msc.service.IdentityHashSet | 607.936 | 32 |
| | | | |
| +---controllers of org.jboss.msc.service.StabilityMonitor | 608.424 | 40 |
| | | | |
| +---monitor of org.jboss.as.controller.ContainerStateMonitor | 496 | 32 |
| | | | |
| +---stateMonitor of org.jboss.as.controller.ModelControllerImpl | 1.256 | 72 |
| | | | |
| +---controller of org.jboss.as.jmx.model.ModelControllerMBeanHelper | 144 | 32 |
| | | | |
| +---exprHelper of org.jboss.as.jmx.model.ModelControllerMBeanServerPlugin | 328 | 24 |
| | | | |
| +---[0] of java.lang.Object[1] | 16 | 16 |
| | | | |
| +---array of java.util.concurrent.CopyOnWriteArrayList | 72 | 16 |
| | | | |
| +---al of java.util.concurrent.CopyOnWriteArraySet | 88 | 16 |
| | | | |
| +---delegates of org.jboss.as.jmx.PluggableMBeanServerImpl | 120 | 16 |
| | | | |
| +---platformMBeanServer of java.lang.management.ManagementFactory [Class] | 448 | 336 |
+---------------------------------------------------------------------------------------------------------------+-----------------+----------------+
```