[TxMt Plugins] Re: reference counts on project NSWindows

Allan Odgaard mailinglist at textmate.org
Sat Feb 6 10:42:56 UTC 2010

On 6 Feb 2010, at 11:34, Niko Matsakis wrote:

> While I am still curious as to what is going on here, I decided to  
> rewrite the code to take a different approach.  Now when I see an  
> NSWindowWillClose notification I remove my inserted views and free  
> my own controller, which ensures that my objects are freed when the  
> user closes the window (and, assuming I retain no references to the  
> NSWindow, the NSWindow should be freed as well).

I flagged your other letter to “read it in depth later” but will then  
drop that :)

It did sound like retain-cycle related. If your controller retains a  
view, that view in turn holds a pointer to its superview a.s.o. until  
it reaches the window, so indirectly your controller retains the  
window (I think, not 100% sure).

More information about the textmate-plugins mailing list