Does NSPrintOperation retain the NSWindow passed in runOperationModalForWindow
Does NSPrintOperation retain the NSWindow passed in runOperationModalForWindow
- Subject: Does NSPrintOperation retain the NSWindow passed in runOperationModalForWindow
- From: "Renzil D'Souza" <email@hidden>
- Date: Thu, 13 Aug 2009 12:30:56 +0530
Hi,
I'm using an NSPrintOperation to print an image which I display in a
temporary window. I also use setCanSpawnSeparateThread as YES, so my
NSPrintOperation is running in a separate thread. The issue is, I've
allocated a temp. window before calling runOperationModalForWindow and I
don't know when should I release it. If NSPrintOperation retains this
window, then I should be able to free my window in my main thread and I hope
NSPrintOperation releases it. On the other hand, if NSPrintOperation doesn't
retain it, perhaps I can release this window in the 'didRunSelector' method.
Could you let me know what exactly does
NSPrintOperation:runOperationModalForWindow do with the window?
Also, is there a way to keep track of memory management while developing in
Objective-C? Most of the time, I'm very confused if I should release
something, or if it will be autoreleased. Maybe you could suggest a good
read that could clarify the usage.
Thanks,
Renzil D'Souza
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden