Assignments to nil...
cg at cdegroot.com
cg at cdegroot.com
Tue Sep 23 11:00:08 UTC 2003
<squeak-dev at lists.squeakfoundation.org> said:
>I am not sure that is a common practice though. I sure wouldn't trust on
>it to work unless the method says so or something. And then I would
>rather have a "reset" method or something.
>
Yup.
Foo>>initialize
self reset
Foo>>reset
bar := nil.
quux := 42.
is what I always use in these cases if I need to call (parts of)
initialize code later on in the life cycle of an object.
--
Cees de Groot http://www.cdegroot.com <cg at cdegroot.com>
GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B
Cogito ergo evigilo
More information about the Squeak-dev
mailing list
|