• 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
NSTreeController, NSOutlineView, and a leak?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTreeController, NSOutlineView, and a leak?


  • Subject: NSTreeController, NSOutlineView, and a leak?
  • From: "email@hidden" <email@hidden>
  • Date: Sun, 7 Dec 2008 13:07:24 -0800

i've got an outline bound via a tree controller to a mutable set of my own proxy objects. when i create a new "real" object, i create a new proxy object and add it to the mutable set via the kvo compliant add<>Object: and all works well, and then i proceed to select the new object (line in the outline view). this all works as expected and the new object shows up properly in the outline view.

if i then undo the creation, i remove the proxy object from my mutable set via the kvo compliant remove<>Object. and this works fine... visually. however, my proxy object is not released and thus not deallocated.

i discovered (after about a day and a half of debuging) that the tree controller was holding a reference to my proxy object as part of its selection, even tho the object had been removed from its bound set. i've been able to solve this by calling the tree controller's -setSelectedIndexPath: nil, prior to my removing my proxy from the bound set.

is this expected behavior? or is this a bug that i should report via radar?

thanx,
ken
_______________________________________________

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


  • Prev by Date: Re: Debugger launched after closing the app window.
  • Next by Date: Re: 3-float struct?
  • Previous by thread: Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?
  • Next by thread: Unit Testing Frameworks
  • Index(es):
    • Date
    • Thread