Closed jackpal closed 8 years ago
Excellent idea
In this particular case, renderer
is marked as nullable, which means that init
does not necessarily needs to be marked as unavailable. It could just call initWithRenderer:nil
instead.
However, the last time I tried to pass nil
to the initializer, my program crashed.
Today I made a mistake by initializing an oscillator module in a test program as follows:
That compiled fine, but it didn't work (as I found out after debugging) because the oscillator module doesn't get initialized fully.
I should have written this instead:
Would you consider adding
and maybe also
NS_DESIGNATED_INITIALIZER
in all the appropriate places in your public headers?