[Newbies] Proper object removal

Rob Rothwell r.j.rothwell at gmail.com
Wed Jun 4 04:04:46 UTC 2008


Hello,

After much help already, I think I need some training in proper object
removal.

When my application creates an object and stores it in an OrderedCollection,
and than wants to delete it, I am trying to do so quite explicitly with
something like:

DataManager>>deleteSelectedAbstractors
    self selected do: [:each |
        self abstractors remove: each.
        each := nil.
    ]

which removes the object from my application (it's collection), and yet when
I look for my object in the system with

DataAbstractor allInstances.

I still see the object I removed, even with an explicit Smalltalk
garbageCollect or garbageCollectMost.  Anything I create just seems to hang
around forever.

Any help understanding what I need to do to make sure my objects really go
away when I am done with them would be greatly appreciated!

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20080604/ffe8af8b/attachment.htm


More information about the Beginners mailing list