|
|
|
|
|
by lunixbochs
1959 days ago
|
|
Ah, I don't just mean the class, I mean you need to have an autoreleasepool block active before calling into AppKit otherwise you can leak memory on every call. It doesn't look like you're using pools yet, or documenting that users of your library should use them. See here: https://developer.apple.com/library/archive/documentation/Co... > Cocoa always expects code to be executed within an autorelease pool block, otherwise autoreleased objects do not get released and your application leaks memory |
|
I have a hard time keeping up with their changes but you might be right: https://developer.apple.com/documentation/foundation/nsautor...
Oddly it says you cannot use them directly, but later implies maybe they are just less efficient. It would be nice if somebody made an issue for this.