I am always very picky about memory leaks, and I donβt understand why my garbage collected the application. My code is completely memory managed and it works fine without garbage collection, not leakage. However, as soon as I turn on garbage collection, it flows!
Just to prove why this leak in garbage collection? (put this dummy code in applicationDidFinishLaunching :)
NSOpenPanel *panel = [NSOpenPanel openPanel];
[panel beginSheetModalForWindow:window completionHandler:^(NSInteger result) {NSBeep();}];
Also, is there a way to prevent leaks in applications (garbage collector or others) that use Scripting Bridge? it seems like they are all flowing, even samples in xcode.
Thanks everyone!
source
share