Garbage Collection leak? Scripting Bridge leak?

Posted by Y.Vera on Stack Overflow See other posts from Stack Overflow or by Y.Vera
Published on 2010-04-26T02:49:51Z Indexed on 2010/04/26 2:53 UTC
Read the original article Hit count: 267

Filed under:
|
|
|
|

Hello everyone!

I'm always really picky about memory leaks and I cannot understand why my garbage collected application leaks. My code is entirely memory-managed and it runs great without garbage collection, not a single leak. However, as soon as I turn on garbage collection it leaks!

Just to prove a point, why does this leak in a garbage collected app? (place this dummy code at applicationDidFinishLaunching:)

NSOpenPanel *panel = [NSOpenPanel openPanel];
[panel beginSheetModalForWindow:window completionHandler:^(NSInteger result) {NSBeep();}];

Also, is there a way to prevent leaks in apps (garbage collected or otherwise) that use Scripting Bridge? it seems as if they all leak, even the sample ones in xcode.

Thanks everybody!

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about mac