• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Regarding MVC design pattern
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regarding MVC design pattern


  • Subject: Re: Regarding MVC design pattern
  • From: Uli Kusterer <email@hidden>
  • Date: Tue, 18 May 2010 18:32:37 +0200

On May 18, 2010, at 1:20 PM, Sai wrote:
> Anyway, why I should retain that?

 Because otherwise it will get autoreleased, but your instance variable will still contain its address, and the next time you try to use it via the instance variable, you will try to talk with random memory at that address, which is a Bad Idea(tm). It may still look like the object that was last there, it may look like a completely different object, or it may have been overwritten by someone in the meantime.

> Will it be released by "somebody"?

 Hopefully by your dealloc method.

 This behaviour would only be different if you were using the garbage collector.

 If all of this is new to you, you should really try to get a good book about the basics of Cocoa objects and memory management.

-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."



_______________________________________________

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

References: 
 >Regarding MVC design pattern (From: Sai <email@hidden>)
 >Re: Regarding MVC design pattern (From: Henry McGilton <email@hidden>)
 >Re: Regarding MVC design pattern (From: Sai <email@hidden>)
 >Re: Regarding MVC design pattern (From: Jack Nutting <email@hidden>)
 >Re: Regarding MVC design pattern (From: Sai <email@hidden>)

  • Prev by Date: Re: Programmatic Binding
  • Next by Date: Re: Cancelling a loading loop in order to load something else
  • Previous by thread: Re: Regarding MVC design pattern
  • Next by thread: Re: Regarding MVC design pattern
  • Index(es):
    • Date
    • Thread