On 24.02.2020 11:53, Wolfgang Lux wrote:
The trick here is that the alloc method in the NSMutableArray class
has a special case to allocate a GSMutableArray instance when called
on the NSMutableArray class, but not so for any subclass. So
[NSMutableArray alloc] returns a GSMutableArray instance, while
[MyMutableArray alloc] returns a MyMutableArray instance.
Now I understand better. I had a look to the sources, and what I found
surprised me: in few places I found
if (self == NSMutableArrayClass)
So it is specifically designed not to allow subclassing (which is
meaningful, from some point of view).
Thanks for clarification.
--
Mick