{"id":4225,"date":"2014-03-30T09:24:42","date_gmt":"2014-03-30T09:24:42","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/ios-constantly-growing-memory-usage-collection-of-common-programming-errors\/"},"modified":"2014-03-30T09:24:42","modified_gmt":"2014-03-30T09:24:42","slug":"ios-constantly-growing-memory-usage-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/ios-constantly-growing-memory-usage-collection-of-common-programming-errors\/","title":{"rendered":"iOS Constantly growing memory usage-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m currently working on a game I started a while ago. Progress was good and everything runs smoothly, but I decided to try using XCode Instruments to check for any leaks in my code. I am using ARC and new objects are only added when others are deleted (part of my game&#8217;s inner-workings), but the total memory size keeps growing as it runs.<\/p>\n<p>My game is completely procedurally generated and requires no assets, it also only uses a couple polygons mapped only with colors, so there are no textures. I expect it should only need a couple MBs to run (which it starts out with) but it just keeps growing.<\/p>\n<p>Now, I noticed something interesting&#8230; What uses up the majority of the data is an entry called IOAccelResource. Which is odd because I don&#8217;t use any accelerometer\/gyroscope\/compass data. I don&#8217;t even have the CoreMotion framework referenced in my project.<\/p>\n<p>The second major use of data is a collection of four mallocs that keep growing. There are a couple more that stay relatively the same.<\/p>\n<p>These two entries aren&#8217;t considered leaks by the program though. And when I tell XCode to analyze my code it doesn&#8217;t point to any problems.<\/p>\n<p>All of the other entries are pretty small and fluctuate around the same point, or just stay the same.<\/p>\n<p>Here is a screenshot of the troublesome entries: <img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/zhuca.png\" \/><\/p>\n<p>Any advice?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m currently working on a game I started a while ago. Progress was good and everything runs smoothly, but I decided to try using XCode Instruments to check for any leaks in my code. I am using ARC and new objects are only added when others are deleted (part of my game&#8217;s inner-workings), but the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4225","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4225"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4225\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4225"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}