{"id":27510,"date":"2019-12-09T16:50:23","date_gmt":"2019-12-09T21:50:23","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=27510"},"modified":"2019-12-09T16:50:23","modified_gmt":"2019-12-09T21:50:23","slug":"cgimagesource-memory-leak","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2019\/12\/09\/cgimagesource-memory-leak\/","title":{"rendered":"CGImageSource Memory Leak"},"content":{"rendered":"<p><a href=\"https:\/\/gist.github.com\/ccgus\/b810c80f0c246d7587cb141bd3f8c216\">Gus Mueller<\/a> (<a href=\"https:\/\/twitter.com\/ccgus\/status\/1203027635011387392\">tweet<\/a>):<\/p>\n<blockquote cite=\"https:\/\/gist.github.com\/ccgus\/b810c80f0c246d7587cb141bd3f8c216\"><p>This sample shows how <code>CGImageSourceCreateThumbnailAtIndex<\/code> leaks something akin \nto the memory behind a CGImageRef when asked to create a thumbnail for a 16bpc\nTIFF image if one isn&rsquo;t present.<\/p><\/blockquote>\n<p>I wonder whether ImageIO got rewritten <a href=\"https:\/\/twitter.com\/ccgus\/status\/1203088963575013376\">in Catalina<\/a>. I&rsquo;ve found multiple bugs where basic stuff like setting an image&rsquo;s metadata doesn&rsquo;t work reliably (FB7435415).<\/p>\n\n<p><a href=\"https:\/\/twitter.com\/Sam_Ohanaware\/status\/1203105129714503681\">Sam Rowlands<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/Sam_Ohanaware\/status\/1203105129714503681\">\n<p>I&rsquo;ve confirmed with other devs that 16-Bit imaging is funky on 10.14 and above. The most common issue I&rsquo;ve seen is 16-Bit images end up with rainbow colors when drawn into a 16-Bit context.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Gus Mueller (tweet): This sample shows how CGImageSourceCreateThumbnailAtIndex leaks something akin to the memory behind a CGImageRef when asked to create a thumbnail for a 16bpc TIFF image if one isn&rsquo;t present. I wonder whether ImageIO got rewritten in Catalina. I&rsquo;ve found multiple bugs where basic stuff like setting an image&rsquo;s metadata doesn&rsquo;t work reliably [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2019-12-09T21:50:26Z","apple_news_api_id":"b4033ada-1ffd-411e-8aa2-d1e77a8d3d92","apple_news_api_modified_at":"2019-12-09T21:50:26Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AtAM62h_9QR6KotHneo09kg","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[131,30,1666,571,71,178],"class_list":["post-27510","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-bug","tag-mac","tag-macos-10-15","tag-memory-management","tag-programming","tag-quartz"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/27510","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=27510"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/27510\/revisions"}],"predecessor-version":[{"id":27511,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/27510\/revisions\/27511"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=27510"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=27510"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=27510"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}