Hi,

I downloaded the R for mac sources and was browsing through the code  
of RDocument. In - (void)close method I noticed comment:
                // --- something is broken - winctrl close doesn't work - I 
have no  
idea why - this is a horrible hack to cover up

I think I found why, in the method - (void) makeWindowControllers the  
window controller for document is allocated and added to the document  
but <<never>> released. The document <<retains>> window controller so  
the code should read something like that:

myWinCtrl = [[RDocumentWinCtrl alloc]  
initWithWindowNibName:@"RDocument"];
[self addWindowController:myWinCtrl];
[myWinCtrl release];

Now window controller will be correctly released on document close  
and will also correctly release the nib's top level objects.

Hope this will help,
Gorazd


        [[alternative HTML version deleted]]

_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to