Is returning [self retain] in copyWithZone for immutable classes with mutable subclasses really safe / a good idea?
One often reads, that immutable classes can implement copyWithZone very efficiently in the following way: - (id) copyWithZone:(NSZone*)zone { return [self retain]; } The idea behind that implementation is obvious: The original and the copy are both immutable instances and they will always have exactly the same content, so why not let both point to the same storage by retaining the original and avoid the overhead of copying. However, what will happen if there is a mutable subclass? With a clean architecture, where a subclass does not have to care about implementation details of its base class,