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 document to the trash and then emptying the trash, the document is still being reported as in use. A closer look at the traces in ObjectAlloc shows that the CGPDFDocument along with its CGPDFPage objects, which PDFKit creates when it reads in the document from disk, are not released. (PDFDocument's initWithURL: method calls CGPDFDocumentCreateWithProvider.) I can get the CGPDFDocument's address in ObjectAlloc, but when running thus, I can't pause the application to get the info gc-roots listing. If I run a normal debug session in Xcode, I don't know how to get the address for the CGPDFDocument that underlies the PDFDocument. So it is difficult to find out what is holding on the the CGPDFDocument (and/or its pages).

Why can't you pause the program in Xcode? Because it is running in Instruments?

Try running gdb from the command line:

gdb /path/to/your/built.app/Contents/MacOS/appname

Then:

attach <pid>

Where <pid> is the process id of your running application.

Can you use one of Instrument's file monitoring instruments to get a backtrace of when that particular file on disk was opened?

b.bum
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to