• 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: NSTableView retain count problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView retain count problem


  • Subject: Re: NSTableView retain count problem
  • From: Kyle Sluder <email@hidden>
  • Date: Mon, 23 Nov 2009 20:34:26 -0800

On Mon, Nov 23, 2009 at 7:43 PM, Shane
<email@hidden> wrote:
>        // This is the 1st and should be only instance I create.

No, it's not, as evidenced by...

> When I'm viewing the call stack in the debugger, I see that my
> DataViewController's init method is called a second time from the line
> … "NSView *mv = [mvc view]".

You've created an instance in your nib, *and* you're creating one in
code.  Specifically, you've got an instance of DataViewControlller
hanging out in the nib that DataViewController is configured to load.
Calling -view results in that nib being loaded, and your second
DataViewController instance unfrozen.

The only place you want DataViewController to live in that nib file is
as the class of File's Owner.

--Kyle Sluder
_______________________________________________

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: NSTableView retain count problem
      • From: Shane <email@hidden>
References: 
 >Re: NSTableView retain count problem (From: Greg Guerin <email@hidden>)
 >Re: NSTableView retain count problem (From: Shane <email@hidden>)

  • Prev by Date: Re: NSTableView retain count problem
  • Next by Date: Problem on NSPopUpButton Class
  • Previous by thread: Re: NSTableView retain count problem
  • Next by thread: Re: NSTableView retain count problem
  • Index(es):
    • Date
    • Thread