• 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: Retain cycle problem with bindings & NSWindowController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Retain cycle problem with bindings & NSWindowController


  • Subject: Re: Retain cycle problem with bindings & NSWindowController
  • From: Allan Odgaard <email@hidden>
  • Date: Wed, 9 Jun 2004 05:33:59 +0200

On 9. Jun 2004, at 4:49, Dennis C. De Mars wrote:

My solution was to send unbind: messages in the windowWillClose:-notification.
OK, I can see that this would work. Do you have to send an unbind message to each view object that has a binding?

At least all those which cause retainment of the involved parties. But in my case I only had a single binding, so not much of a problem...

[...] If the window controller could be convinced to completely release the window before it is itself dealloced then the cycle could be broken but there is no way I know of to do this

You can send setWindow: with nil to the window controller.

This could be in a response to a 'window will close'-notification. But there are cases where the window may re-open, and thus one needs to have the class responsible for releasing the window controller also perform this workaround.

Anyway, the best thing would be for Apple to fix the binding retain situation so I would have to go through all this!

Indeed, there is probably a lot of applications out there which doesn't work around this problem and thus leaks...
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Retain cycle problem with bindings & NSWindowController
      • From: "Dennis C. De Mars" <email@hidden>
References: 
 >Retain cycle problem with bindings & NSWindowController (From: "Dennis C. De Mars" <email@hidden>)
 >Re: Retain cycle problem with bindings & NSWindowController (From: Allan Odgaard <email@hidden>)
 >Re: Retain cycle problem with bindings & NSWindowController (From: "Dennis C. De Mars" <email@hidden>)
 >Re: Retain cycle problem with bindings & NSWindowController (From: Allan Odgaard <email@hidden>)
 >Re: Retain cycle problem with bindings & NSWindowController (From: "Dennis C. De Mars" <email@hidden>)

  • Prev by Date: Re: Insuring a path exists
  • Next by Date: Re: Insuring a path exists
  • Previous by thread: Re: Retain cycle problem with bindings & NSWindowController
  • Next by thread: Re: Retain cycle problem with bindings & NSWindowController
  • Index(es):
    • Date
    • Thread