• 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: Weird problem involving memory management and global variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird problem involving memory management and global variable


  • Subject: Re: Weird problem involving memory management and global variable
  • From: Sam Stigler <email@hidden>
  • Date: Wed, 30 May 2007 10:17:02 +1000

I was doing it because I wasn't sure if _children would be autoreleased when I autorelease the class. Do I not need to worry about that?

Sam

On May 30, 2007, at 4:39 AM, Eric Long wrote:

-(id) init {
    self = [super init];
    if (self != nil) {
        _children = [[[NSMutableArray alloc] initWithCapacity:10]
autorelease];
    }
    return self;
}

I doesn't make sense to me why you are autoreleasing _children.


Eric Long

______________________________________________________________________ _____
Macintosh Software Engineer Matt. 11:28
Smith Micro Inc. http://www.allume.com





_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Follow-Ups:
    • Re: Weird problem involving memory management and global variable
      • From: Andrew Farmer <email@hidden>
  • Prev by Date: Re: CD: Creating a managed object
  • Next by Date: Places to go for a new Cocoa developer?
  • Previous by thread: Re: Weird problem involving memory management and global variable
  • Next by thread: Re: Weird problem involving memory management and global variable
  • Index(es):
    • Date
    • Thread