[Glass] Weird problem with class instance variable
Mariano Martinez Peck via Glass
glass at lists.gemtalksystems.com
Tue Aug 25 13:03:08 PDT 2015
Hi guys,
I define a classInstVars: called 'Instances' to keep track of new
persistent instances in my class FaBackgroundProcess. Of course, I
implement #new to add those there.
But I am having a very strange issue now. I have this accessor:
FaBackgroundProccess class >> instances
^ Instances ifNil: [ Instances := OrderedCollection new ]
If I execute:
FaBackgroundProcess instances ->>>>> anOrderedCollection( )
I get an empty collection (which is what I expect). However, if I inspect
the class FaBackgroundProcess and see the slot for 'Instances' I see lots
of instances of FaBackgroundProcess! (when I expect to see same as the
answer of #instances, that is, empty) And those instances are really alive
as they prevent GC of other objects.
So...what is going on???? I attach an screenshot with all the pieces. Any
help is really welcome since I am lost.
Thanks in advance,
--
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150825/ed76936d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2015-08-25 at 5.02.48 PM.png
Type: image/png
Size: 323671 bytes
Desc: not available
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150825/ed76936d/attachment-0001.png>
More information about the Glass
mailing list