if i did this
Object * myObject = [[Object alloc]init];
[myObject release];
is there anything wrong about allocating my object in next line
myObject = [[Object alloc]init];
again?
No problem at all.
[myobject release];
releases the object pointed at by myObject
.
Later, myobject = [[Object alloc] init]
will make myobject
point to another object.