• 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: Newbie memory management question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie memory management question


  • Subject: Re: Newbie memory management question
  • From: Aaron Boothello <email@hidden>
  • Date: Wed, 6 Oct 2004 11:16:29 +0800

Thanks fort hose links they really helped clear a lot of questions i had about mem-managment.

I still got one question regarding releasing objects.
If an object(superObject) has an item within it that is dynamically allocated as well (lets call this miniObject), what happens when you release the superObject ?
does that automatically take care of the miniObject and releases the entire object ? or is the whole thing retained ?

Cheers,
Aaron

On 04/10/2004, at 1:26 PM, Scott Stevenson wrote:


On Oct 3, 2004, at 8:19 PM, Aaron Boothello wrote:

Now how do i free up the memory a superModel is taking up ?
do i write a '-(void) dealloc' in the superModel class definition and then just do something like '[simpleModel[x] release]' or '[simpleModel[x] dealloc]' (and then write a dealloc for the simpleModels as well ?

Hi Aaron,

I think reading one of the memory management tutorials will probably serve you better than getting answers to individual questions. Understanding only parts of memory management will lead to odd behavior or outright crashes.


http://cocoadevcentral.com/articles/000055.php
http://www.stepwise.com/Articles/Technical/2001-03-11.01.html

<http://developer.apple.com/documentation/Cocoa/Conceptual/ CocoaObjects/Articles/ObjectCreation.html#//apple_ref/doc/uid/ 20002154/1007165>


- Scott


--
http://treehouseideas.com/
http://theobroma.treehouseideas.com/ [blog]

_______________________________________________
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

_______________________________________________
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
  • Follow-Ups:
    • Re: Newbie memory management question
      • From: Larry Fransson <email@hidden>
References: 
 >Newbie memory management question (From: Aaron Boothello <email@hidden>)
 >Re: Newbie memory management question (From: Scott Stevenson <email@hidden>)

  • Prev by Date: NSMatrix help
  • Next by Date: Re: Oracle Database Connection within a Cocoa Application
  • Previous by thread: Re: Newbie memory management question
  • Next by thread: Re: Newbie memory management question
  • Index(es):
    • Date
    • Thread