Hi All,

I am trying to find out how memory is retained/released when using different 
Cocoa collection classes.  Is there a good resource on this anyone can connect 
me to?

Here is some detailed questions about what I am trying to find out:

If I create a dictionary in the following manner (where myArray is an NSArray* 
and authorName is an NSString*)

NSDictionary * myDict = [NSDictionary dictionaryWithObjectsAndKeys:myArray, 
@"Titles", authorName, @"Name",nil];

Does this call automatically increase the retain count of myArray and 
authorName?  So that I should call release on them if I don't need to have them 
anywhere else outside the dictionary?  Or will calling release on them mess up 
the dictionary?

Also - once I am done with this dictionary -  since I created it using a class 
method (and not alloc) - am I right in assuming that I should not call release 
on it?  And if that is the case when does it get released?

Thanks for your help!
Mazen Abdel-Rahman
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to