Weird retain Issue
Weird retain Issue
- Subject: Weird retain Issue
- From: Karl Goiser <email@hidden>
- Date: Wed, 25 Feb 2004 09:44:34 +1100
Hello,
I wonder if anybody can explain this for me?
One object needs a reference to another object, so the first object's
init method contains a line like:
instanceVariable = [parameter retain];
Fairly standard stuff. Except that running ObjectAlloc shows that the
object being passed in doesn't ever get dealloc'ed. But if I change
the above line to (and make no other changes to the code):
instanceVariable = parameter;
[instanceVariable retain];
The object does get dealloc'ed.
Curious...
Karl
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.