When I use alloc on a class that I created (for example on stack class that has an underlying NSMutableArray object) will it apply alloc to all of the properties of it ? or do I have to override the alloc method to make sure that the alloc is called on properties ?
When I use alloc on a class that I created (for example on stack
Share
You do not need to override the alloc method, the properties will be initialized for you to their default values, that is nil for objects and the default values for the primitive types.
So all you need to do:
You cannot override the alloc method, all the properties will just be set to their default values. You can however override init, to set initial values to properties (instead of their default values):