• 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: Question about NSTreeController/NSOutlineView instance cleanup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about NSTreeController/NSOutlineView instance cleanup


  • Subject: Re: Question about NSTreeController/NSOutlineView instance cleanup
  • From: Markus Spoettl <email@hidden>
  • Date: Thu, 10 Apr 2008 19:46:18 -0700

The first thing to check is how you are initializing the treeContent variable. What method are you using to create it, and are you retaining it?

OK, this is what I do:

- (id)init
{
    self = [super init];
    if (self) {
        treeContent = [[NSMutableArray alloc] init];
    }
    return self;
}

- (void)dealloc
{
	[treeContent release];
	[super dealloc];
}

I thought I don't have to retain treeContent since I automatically do that with alloc-init, right?

When treeContent is released, I assume it automatically releases all TreeNode objects in it and that's what is reported in the log entry to be unexpected. I get as many warnings as root node entries in treeContent but none for child objects further down the hierarchy.

Markus
--
__________________________________________
Markus Spoettl

_______________________________________________

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: Question about NSTreeController/NSOutlineView instance cleanup
      • From: Quincey Morris <email@hidden>
References: 
 >Question about NSTreeController/NSOutlineView instance cleanup (From: Markus Spoettl <email@hidden>)
 >Re: Question about NSTreeController/NSOutlineView instance cleanup (From: Markus Spoettl <email@hidden>)
 >Re: Question about NSTreeController/NSOutlineView instance cleanup (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: NSArrayController's "selectionIndex" weirdness
  • Next by Date: Re: Why might DO/NSConnection fail?
  • Previous by thread: Re: Question about NSTreeController/NSOutlineView instance cleanup
  • Next by thread: Re: Question about NSTreeController/NSOutlineView instance cleanup
  • Index(es):
    • Date
    • Thread