I think it is impossible to implement Coordinator without having a strong reference to all active Coordination’s, how could pop() otherwise return the current coordination? And the reflection API has the same implications. So the answer is clearly yes.
That said, this way you loose an extra safety check that nobody screwed up downstream … Kind regards, Peter Kriens > On 31 jul. 2015, at 11:48, Carsten Ziegeler <cziege...@apache.org> wrote: > > Hi, > > Christian brought up an interesting scenario for using the coordinator. > The question is, if the following is a valid scenario: > > coordinator.begin("test", 0); > System.gc(); > coordinator.pop().end(); > > (Of course no one will do a gc() call in his code, its just for > demonstrational purposes) > > The coordination is bound to the thread, but no reference is held. > > Should the coordination be garbage collected? Looking at the CT it > seems, the answer is yes. > > Regards > Carsten > -- > Carsten Ziegeler > Adobe Research Switzerland > cziege...@apache.org > _______________________________________________ > OSGi Developer Mail List > osgi-dev@mail.osgi.org > https://mail.osgi.org/mailman/listinfo/osgi-dev _______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev