• 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: NSTreeController and object retain counts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTreeController and object retain counts


  • Subject: Re: NSTreeController and object retain counts
  • From: Greg Guerin <email@hidden>
  • Date: Sun, 8 Nov 2009 23:59:23 -0700

Mads Paulin wrote:

#import <Cocoa/Cocoa.h>

@interface MyDocument : NSDocument
{
	NSMutableArray *array;
}

@property (readonly) NSMutableArray* array;

@end

All I changed in the doc impl is
@synthesize array
and
array =[ [NSMutableArray]alloc init]; in the init method.


Does your MyDocument implementation ever release array? If not, then what happens to the NSMutableArray and what it contains when MyDocument is dealloc'ed? I don't think @synthesize will synthesize any cleanup for you.

  -- GG
_______________________________________________

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


  • Follow-Ups:
    • Re: NSTreeController and object retain counts
      • From: "Mads Paulin" <email@hidden>
  • Prev by Date: Simulating mouse events
  • Next by Date: Re: code data export import strategies
  • Previous by thread: Re: NSTreeController and object retain counts
  • Next by thread: Re: NSTreeController and object retain counts
  • Index(es):
    • Date
    • Thread