{"id":14044,"date":"2016-04-02T11:18:49","date_gmt":"2016-04-02T15:18:49","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=14044"},"modified":"2016-04-02T11:18:49","modified_gmt":"2016-04-02T15:18:49","slug":"how-to-simulate-memory-pressure","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2016\/04\/02\/how-to-simulate-memory-pressure\/","title":{"rendered":"How to Simulate Memory Pressure"},"content":{"rendered":"<p><a href=\"https:\/\/eternalstorms.wordpress.com\/2016\/03\/31\/mac-developer-tip-how-to-simulate-memory-pressure\/\">Matthias Gansrigler<\/a>:<\/p>\n<blockquote cite=\"https:\/\/eternalstorms.wordpress.com\/2016\/03\/31\/mac-developer-tip-how-to-simulate-memory-pressure\/\">\n<p>In iOS Simulator, you can, via a menu item, quickly simulate memory pressure for the simulated device to see if your app behaves correctly under low memory conditions (releasing caches, cleaning up resources, and so on).<\/p>\n<p>Recently, I had the need for it on the Mac (where such a menu item is not available), while working on an XPC service for Yoink, to see if it terminated properly under certain conditions.<\/p>\n<\/blockquote>\n<p>The <tt>memory_pressure<\/tt> tool lets you do this to test Mac apps.<\/p>","protected":false},"excerpt":{"rendered":"<p>Matthias Gansrigler: In iOS Simulator, you can, via a menu item, quickly simulate memory pressure for the simulated device to see if your app behaves correctly under low memory conditions (releasing caches, cleaning up resources, and so on). Recently, I had the need for it on the Mac (where such a menu item is not [&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":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","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":[75,31,30,571,71,268],"class_list":["post-14044","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-developertool","tag-ios","tag-mac","tag-memory-management","tag-programming","tag-testing"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/14044","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=14044"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/14044\/revisions"}],"predecessor-version":[{"id":14045,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/14044\/revisions\/14045"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=14044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=14044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=14044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}