Re: bind, unbind and retainCount problems
Re: bind, unbind and retainCount problems
- Subject: Re: bind, unbind and retainCount problems
- From: Julien Palmas <email@hidden>
- Date: Tue, 26 Apr 2005 16:48:32 +0900
And by the way, a strange thing with the binding of the NSPopupButton
...
If I don't bind it, it gets deallocated automatically when the
superview is deallocated when I close the document ...
But if I bind it, let's say "content", it receives one more retain and
then doesn't get deallocated with the document.
Since when does a view gets retained when binding it to a controller
??? If I refer to mmalc web page about bindings, the view should retain
the controller, but not the contrary ...
On Apr 26, 2005, at 4:07 PM, Julien Palmas wrote:
Thank you for the link ;-)
I used the workaround explained on you web site.
Still, I don't know how to unbind programatically a UI element that
was binded with IB.
For example, I have a NSPopupButton in my interface. As long as I
don't bind it to a NSArrayController, when I close the document,
everything is OK, no memory leak.
If I bind it to a nsarraycontroller, then a memory leak appears.
I tried the unbind: method, without results ....
Let me state again that my fileowner is NOT a subclass of
NSWindowController and that I have to dealloc all the top level UI
element myself ......
On Apr 26, 2005, at 12:26 PM, Scott Stevenson wrote:
On Apr 25, 2005, at 7:32 PM, Julien Palmas wrote:
But it looks like not using NSWindowController implies more trouble
if you are also using bindings in the nib. The nib holds a
NSArrayController that has its contentArray binded to an NSArray in
the fileOwner. This binding sends a retain message to my fileOwner.
<http://theocacao.com/document.page/18>
<http://homepage.mac.com/mmalc/CocoaExamples/
controllers.html#memManagement>
- Scott
--
http://treehouseideas.com/
http://theocacao.com/ [blog]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden