If I implement a class that has no sensible default values, what should I do with the init method which takes no arguments? If there are no valid defaults, the init method has no use.
My gut says that it should release the object and return nil:
- (id)init {
[self release];
return nil;
}
...but when reading the Apple docs for NSObject:
Every class must guarantee that the init method either returns a fully functional instance of the class or raises an exception.
That confuses me :(