On Sat, Jan 9, 2010 at 11:49 PM, Martin McClure <martin@hand2mouse.com>wrote:
Mariano Martinez Peck wrote:
Hi guys: I have this little (piece) of test:
| segment external internal root |
external := 'mariano'. internal := true -> external. root := false -> internal. internal := nil.
segment := ImageSegment new copyFromRoots: (Array with: root with: external) sizeHint: 5000 areUnique: true.
self assert: segment outPointers size = 2.
And that is green.
However, if I change 'mariano' to Object new, I have that segment outPointers size is 3 instead of 2.
I really don't understand why. Does someone see something ?
What outPointers do you expect to be present?
Thanks for the answer Martin. I would expect just true and false.
With my limited understanding of ImageSegment theory I would expect there to be no outPointers in this example, because there are no references from objects in the ImageSegment to objects outside the ImageSegment, except for the well-known objects true and false.
Exactly. I would expect to have only false and true in the outPointers, but not also the Object new. In the case of 'mariano' it is correct and only get false and true in the outPointers, but if I put Object new instead of 'mariano', in outPointers I get, true, false and that object I created. I don't see the difference between creating a string and an object. Cheers Mariano
Regards,
-Martin
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project