This commit puts the content of write_jpeg into a autorelease_pool context provided by PyObjC. This essentially means that the objects should be cleaned up when the context is exited and prevent them from leaking (memory leak). https://pyobjc.readthedocs.io/en/latest/api/module-objc.html#memory-management https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmAutoreleasePools.html
4.9 KiB
4.9 KiB