object Allocation
object Allocation
- Subject: object Allocation
- From: Jerrod Fowkes <email@hidden>
- Date: Wed, 19 Apr 2006 13:06:36 -0700 (PDT)
Hello,
I have a question about object allocation. I noticed that to code:
NSDictionary* dict;
dict = [NSDictionary dictionaryWithDictionary: object];
[dict release];
creates problems later on in code. I think it has something to do with the autoReleasePool. not sure. My question is, when the class method gets called, it doesn't actually allocate the object 'dict'?
I noticed that :
dict = [[NSDictionary alloc] initWithDictionary: object];
[dict release];
doesn't crash the program.
Could someone enlighten me on this? -Jerrod Fowkes
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden