I am bothered by the following code snippet in my program.
If I write
mo=[[myObj alloc] init];
it fails, but if I write
mo=[myObj alloc];
mo=[mo init];
it works. These two methods are supposed to be equivalent but somehow I am messing up. Any light?
Clarifications:
myObj is the name of a class
It fails by trying to allocate for a different kind of object, failing to find the right methods and finally crapping out far from the initialization.