Rob Rothwell-2 wrote: > > [snip] >> DataManager>>deleteSelectedAbstractors >> self selected copy do: [:each | >> self abstractors remove: each. >> self selected remove: each. >> ] > > So...why would I use a copy (self selected copy) in this case? Is that a > clue to my misunderstanding? >
Because the copy of the collection will live only during the execution of #do: and thus it won't hang on to references to your objects. Saludos, Victor Rodriguez. > Rob > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > -- View this message in context: http://www.nabble.com/Proper-object-removal-tp17638745p17645408.html Sent from the Squeak - Beginners mailing list archive at Nabble.com. _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners