init methods shouldn't raise exceptions
Brought to you by:
will_mason
When init raises an exception, the alloc'ed memory
leaks. Check this out:
OLText* myText = [[OLText alloc] init];
If init raises an exception, myText will never get the
value returned by alloc assigned to it. Therefore, it
becomes impossible to free the memory.
Make sure that init methods cannot raise exceptions.