Re: Help with Basics
Re: Help with Basics
- Subject: Re: Help with Basics
- From: Rounak Jain <email@hidden>
- Date: Tue, 23 Nov 2010 21:45:47 +0530
> Rounak Jain wrote:
> >> As Jerry pointed out, you need to learn the basics; please read up on the basics to include memory management.
> >
> > I am using Garbage collector. _______________________________________________
>
> The previous comments still stand.
>
> For starters, there are a few good reasons you should still understand
> non-GC memory management:
>
> 1) You may end up having to maintain someone else's reference-counted
> code or develop code for a non-GC environment. A dual-mode framework is
> an example of such code.
>
> 2) There can be issues with garbage collection depending on your
> application design - cf. Garbage Collection Programming Guide's
> "Adopting Garbage Collection."
>
> 3) Garbage Collection does not exist (yet) in iOS.
>
> Even if you are sure these will never apply to you (and "never say
> never"), your code reveals a general need to learn the basics.
>
> - --
> Conrad Shultz
I am studying Cocoa from Pragmatic's Beginning Mac Programming. I have re-read the chapter of Memory Management. The basic idea that I have gathererd is:
"If you allocate an object using alloc, you need to take responsibility for releasing it when you’re done.
However, if class methods are used, then there is no need to worry about releasing objects because they are auto-released."
If someone can point me to an article that helps me understand the mistake in my code, I would be grateful._______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden