> On 30 May 2015, at 5:20 , Nicolai Hess <[email protected]> wrote: > > > > 2015-05-30 16:01 GMT+02:00 Sean P. DeNigris <[email protected] > <mailto:[email protected]>>: > Nicolai Hess wrote > > I don't fully understand what to change. > > If Spur will be ready for the next release, why don't we just wait... > > I would like to better understand what is the problem and I am sure > there is some kind of software pattern to prevent this > circular reference situation.
A block usually references its outer context.* The default subscriber of a block is the object that defines it. Thus, if added to a Weak SubscriptionDictionary, the value/block (which is held strongly) references the key/subscriber (held weakly), and it never gets garbage collected. While the big selling point of ephemerons is to get notifications when an object is *about* to be GC'd instead of after it has been GC'd (so instead of the executor being a shadow copy of an object, the executor can be the object itself), they also solves the above by disregarding any references to the key from the value when checking liveliness. Cheers, Henry * The exception being "clean" blocks that do not reference inst vars / temps declared outside the block (which aren't of much use for announcements)
