Re: object Allocation
Re: object Allocation
- Subject: Re: object Allocation
- From: Jerrod Fowkes <email@hidden>
- Date: Wed, 19 Apr 2006 14:08:08 -0700 (PDT)
I Just thought I would say thank you to everyone. This was a valuable piece of information with my development through the rest of the frameworks of the cocoap api. I have read through a book Cocoa Programming For Mac OS X by Aaron Hillegass. It's a fairly decent book. I am a fluent .NET C# developer on a mac project. I am in week 3 right now and have managed to port the System.Data.DataSet to the mac platform in it's rawest form. Thanks to everyone it works...(without crashing ;)) and basically I am seeing it as a very re-usable piece of software, not just for internal use but for the community as well. However I don't know where I would post it really. I have noticed that there really isn't a whole lot of people that work with the Web Services Core API in this mailing list, else I would have other responses from my other mails ;) Again thank you. -Jerrod Fowkes
"Juan P. Pertierra" <email@hidden> wrote: I agree with everything, the one thing I do not understand is the issue about making a copy. My
understanding is that in both cases, the result is simply an address to a newly allocated object. The
difference is when and how it gets deallocated/released: when using +dictionary..., it is autoreleased.
When using [[NSDictionary +alloc] init...], the object is implicitly retained.
This is my understanding of it.
Cheers,
Juan
> -------Original Message-------
> From: Jerrod Fowkes
> Subject: Re: object Allocation
> Sent: 19 Apr '06 20:18
>
> thank you, however I have a firm enough grasp on retain and release. I just need to know where it is
being applied. Here is what I am guessing:
>
> dictionaryWithDictionary: object
>
> returns the already allocated address by object and doesn't make a copy. However I don't think this
could be, since you could just set dict = anotherDict. So that leads me to think that the dictionary that is
returned gets added to the autoreleasepool. thus not having a retain count.
>
> alloc] initWithDictionary: object
>
> gets it's retainCount incremented because it was allocated. So it would need to be released so that it's
retain count can go back to zero to be allocated.
>
> I need to be confirmed in this. -Jerrod Fowkes
> Nick Zitzmann wrote:
> On Apr 19, 2006, at 2:06 PM, Jerrod Fowkes wrote:
>
> > 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'?
>
>
>
> Nick Zitzmann
>
>
>
>
>
>
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger�s low��PC-to-Phone call rates.
> _______________________________________________
> 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
>
---------------------------------
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