Re: mouse pointer for drag copy
Re: mouse pointer for drag copy
- Subject: Re: mouse pointer for drag copy
- From: Bertrand Landry Hetu <email@hidden>
- Date: Mon, 4 Oct 2004 18:22:41 -0700
I stumbled on the same issue today and found a different way to avoid the crash on quit. I clear out the drag pasteboard in terminate:.
NSPasteboard * pasteboard = [NSPasteboard pasteboardWithName: NSDragPboard];
[pasteboard declareTypes: [NSArray array] owner:
self];
( of course only do it if the change count has not changed).
On 29 juil. 2004, at 13:34, Nick Zitzmann wrote:
On Jul 29, 2004, at 1:48 PM, Adam Maxwell wrote:
Incidentally, I take back what I said earlier; sending an array of multiple types to the Finder caused my app to segfault on quit
That's due to a bug in Mac OS X 10.3 where, if you perform a file-promise drag with multiple files at once, then the AppKit deallocates the NSFilePromiseDragSource private class too early, causing the app to crash when the AppKit tries to re-release the class on termination. At least that's what I observed by watching the whole process in GDB.
AFAIK there is only one workaround, and it is to add this to your application's source:
@interface NSFilePromiseDragSource : NSObject
{ }
@end
@implementation NSFilePromiseDragSource (DontCrash)
- (void)dealloc { }
- (unsigned int)retainCount { return UINT_MAX; }
@end
That way the class will never deallocate, and thus won't crash when the AppKit tries to double-deallocate it. While this does cause a memory leak to occur when file promise drags occur, I can't find any other good way of solving this problem...
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden