On Jan 18, 2012, at 3:47 PM, Marco S Hyman wrote:
> I've done some searches and haven't found anything regarding this
> in my situation. An appropriate RTFM pointer would be appreciated.
Update... sometimes I'm getting this error, too...
malloc: reference count underflow for 0x40048fb00, ....
Garbage collected app, Xcode 4.2.1, Lion 10.7.2.
The breakpoint is inside of NSOpenPanel -runModal but ONLY occurs when
dragging to select multiple files. cmd-click or shift-click work fine.
Running with malloc guards and other tests for trashed memory haven't
shown anything obvious. And why only when dragging?
Anyone else have some hints? I did make one slight modification to
my code in that I now CFRelease the array ref I got from
CGImageSourceCopyTypeIdentifiers() instead of making it collectable.
No change in operation. Didn't expect any.
The code that is giving me a headache:
NSOpenPanel *panel = [NSOpenPanel openPanel];
CFArrayRef types = CGImageSourceCopyTypeIdentifiers();
[panel setAllowedFileTypes: (NSArray*) types];
[panel setAllowsMultipleSelection: YES];
[panel setCanChooseFiles: YES];
[panel setCanChooseDirectories: NO];
NSInteger result = [panel runModal]; <==== error displayed in runModal
CFRelease(types);
if (result == NSOKButton) {
...
}
Marc
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]