tjwatson commented on a change in pull request #131:
URL: https://github.com/apache/felix-dev/pull/131#discussion_r824905612



##########
File path: scr/src/main/java/org/apache/felix/scr/impl/ComponentRegistry.java
##########
@@ -774,4 +774,11 @@ public void run()
             }
         }
     }
+
+    public void shutdown() {

Review comment:
       I don't think so.  `changeCountTimer` is volatile here and the object 
itself is thread safe.  Calling cancel multiple times should not be an issue.  
Besides that once ComponentRegistry is shutdown references to it are gone from 
the activator and it should GC just fine.  Technically even the activator 
doesn't need to null out the registry there because the framework throws away 
the activator instance after the bundle is stopped.
   
   Also, nulling out would incorrectly allow a new timer if the method 
`org.apache.felix.scr.impl.ComponentRegistry.updateChangeCount()` is somehow 
called again from another thread after the bundle has stopped.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@felix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to