[Glass] RcIdentityBag holding deleted objects via instVar "components"?

Mariano Martinez Peck via Glass glass at lists.gemtalksystems.com
Mon Aug 24 12:28:32 PDT 2015


Hi guys,

I use RcIdentityBag as the "collection" class for the typical storage of
domain persistent objects. I am getting an issue now where I cleaned such a
collection but things are not GCed.

I have one object whose print string looks like "aRcIdentityBag( )" and
"self size" does answer zero. However,

self instVarNamed: 'components' ----->

 anArray( anIdentityBag( ), anIdentityBag( ), anIdentityBag( ),
anIdentityBag( ), anIdentityBag( *aDpOfxPriceRepository*), anIdentityBag(
*aDpOfxPriceRepository*), anIdentityBag( ), anIdentityBag( ),
anIdentityBag( ), anIdentityBag( ), anIdentityBag( ), anIdentityBag( ),
anIdentityBag( ), anIdentityBag( ), anIdentityBag( ), anIdentityBag( ),
anIdentityBag( ), anIdentityBag( ), anIdentityBag( ), anIdentityBag( ),
anIdentityBag( ), anIdentityBag( ), anIdentityBag( ), anIdentityBag( ),
anIdentityBag( ), anIdentityBag( ), anIdentityBag( ), anIdentityBag( ),
anIdentityBag( ), anIdentityBag( ))

WTF?  The collection is empty, but the internal 'components' instVar is
holding the already deleted objects that were in the collection
(*DpOfxPriceRepository
*instances).

BTW...I remember a similar issue with the ObjectLogEntry  whose ObjectQueue
is a RcQueue. I remembered that I was not GCing objects while I was trying:

ObjectLogEntry class >> emptyLog
"expect the caller to abort, acquire lock, and commit if necessary"

*    self objectQueue removeAll.*
    ObjectLog := nil.


That was not GCing. Once I run #initialize instead, suddenly things got
GCed. So since the code there does a #removeAll too I wonder if it wasn't
the same issue. Not sure since RcQueue does not have a 'component'
instVar...but just wondering.


Any idea what could be wrong?

-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150824/67da88a2/attachment.html>


More information about the Glass mailing list