Re: Who should release whom in a document-based app?
Re: Who should release whom in a document-based app?
- Subject: Re: Who should release whom in a document-based app?
- From: Allan Odgaard <email@hidden>
- Date: Wed, 28 Jul 2004 05:14:21 +0200
On 28. Jul 2004, at 3:52, Rick Hoge wrote:
[...] I respond to windowWillClose in the window controller, and note
that the retain count of both the document and the window controller
are unexpectedly high (3 for the doc, 8 for the window controller). I
have a number of custom views in the document nib file and these do
not get the dealloc message either.
This is somewhat complicated by the fact that there are Cocoa bindings
to the window controller in the nib file. [...]
And that is your problem, since the views will then retain the window
controller, thus causing a cycle (since the window controller retains
top-level nib objects, which retain...).
There has been some discussions about this earlier, but there is no
easy fix for the problem. What I do is manually unbind all my
bindings, although it's quite tedious (since you may then also need to
introduce IBOutlets)...
_______________________________________________
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.