P
P
Petrushka2015-03-27 03:05:42
Objective-C
Petrushka, 2015-03-27 03:05:42

Create an object?

Good day, I recently passed a test and there was a question whether there could be a difference in the selection and initialization of an object

SomeClass * object = [SomeClass alloc];
object = [SomeClass init];
// с привычным
SomeClass * object = [[SomeClass alloc]init];

so, sometimes there is a difference, why? point me to an example
PS sorry for my literacy)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question