Re: File still in use after closing document window

2008-06-03 Thread Antonio Nunes
On Jun 3, 2008, at 8:46 AM, Bill Bumgarner wrote: The actual loading is done like this: self.masterPDFDocument = [[ANPDFDocument alloc] initWithURL: absoluteURL]; If your -setMasterPDFDocument: -- synthesized or manually written -- follows traditional reatain/release rules, the above

Re: File still in use after closing document window

2008-06-03 Thread Bill Bumgarner
On Jun 2, 2008, at 11:56 PM, Antonio Nunes wrote: On Jun 3, 2008, at 8:46 AM, Bill Bumgarner wrote: The actual loading is done like this: self.masterPDFDocument = [[ANPDFDocument alloc] initWithURL: absoluteURL]; If your -setMasterPDFDocument: -- synthesized or manually written --

Re: File still in use after closing document window

2008-06-03 Thread Bill Bumgarner
On Jun 2, 2008, at 10:57 PM, Antonio Nunes wrote: The actual loading is done like this: self.masterPDFDocument = [[ANPDFDocument alloc] initWithURL: absoluteURL]; If your -setMasterPDFDocument: -- synthesized or manually written -- follows traditional reatain/release rules, the above

Re: File still in use after closing document window

2008-06-03 Thread Antonio Nunes
On Jun 3, 2008, at 9:13 AM, Bill Bumgarner wrote: You can use gdb to figure out who is hanging on to the object for longer than expected. Print the address of it immediately after the above line of code. Then, after closing the document and after hitting pause to drop into gdb, try:

Re: File still in use after closing document window

2008-06-03 Thread Bill Bumgarner
On Jun 3, 2008, at 2:29 AM, Antonio Nunes wrote: However: the original issue was not resolved by this fix. I ran the app through Instruments with ObjectAlloc and it shows that after closing the document my NSDocument subclass instance is indeed cleared. However, moving the original PDF

Re: File still in use after closing document window

2008-06-03 Thread Antonio Nunes
On Jun 3, 2008, at 5:52 PM, Bill Bumgarner wrote: Why can't you pause the program in Xcode? Because it is running in Instruments? Yes, I could find no way to pause it after Start with Performance Tool- Leaks (or Object Allocations for that matter). But then I realised I should attach the

Re: File still in use after closing document window

2008-06-03 Thread Bill Bumgarner
On Jun 3, 2008, at 2:06 PM, Antonio Nunes wrote: On Jun 3, 2008, at 5:52 PM, Bill Bumgarner wrote: Why can't you pause the program in Xcode? Because it is running in Instruments? Yes, I could find no way to pause it after Start with Performance Tool-Leaks (or Object Allocations for that

File still in use after closing document window

2008-06-02 Thread Antonio Nunes
Hi, My NSDocument based app loads (imports) PDF files into its documents. After a PDF file has been loaded, and the document window it was loaded into has been closed, the original cannot be deleted when emptying the trash, because the finder thinks it is still in use. It is necessary to

Re: File still in use after closing document window

2008-06-02 Thread Antonio Nunes
On Jun 2, 2008, at 2:06 PM, Hamish Allan wrote: My NSDocument based app loads (imports) PDF files into its documents. What code are you using to load them? The actual loading is done like this: self.masterPDFDocument = [[ANPDFDocument alloc] initWithURL: absoluteURL]; Although I