Behavior deepCopy smells

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Behavior deepCopy smells

Nicolas Cellier
I think that Behavior>>deepCopy should either
   ^self
or
   ^self copy

but not
   ^self shallowCopy
because the methodDictionary should be copied not shared (plus
problems with shared subclasses, Metaclass soleInstance etc...).

I suggest ^self. OK ?

Nicolas