{"id":5279,"date":"2012-08-29T13:42:58","date_gmt":"2012-08-29T20:42:58","guid":{"rendered":"http:\/\/blog.mozilla.org\/addons\/?p=5279"},"modified":"2012-08-29T13:42:58","modified_gmt":"2012-08-29T20:42:58","slug":"test-your-add-ons-for-memory-leakage","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/addons\/2012\/08\/29\/test-your-add-ons-for-memory-leakage\/","title":{"rendered":"Test your add-ons for memory leakage"},"content":{"rendered":"<p>The most common type of add-on memory leakage is <a href=\"https:\/\/developer.mozilla.org\/en\/Zombie_Compartments\" target=\"_blank\">Zombie Compartments<\/a>, where\u00a0an add-on accidentally holds on to parts of a web site in memory after a tab is closed, and massive amounts of memory may be eaten up if these tabs accumulate.<\/p>\n<p>While in most cases they don&#8217;t accumulate, for the relatively small proportion of users this affects, the entire browsing experience is negatively impacted. We have been <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=700547\" target=\"_blank\">tracking<\/a> add-ons that create Zombie Compartments and have fixed many of those instances ahead of yesterday&#8217;s Firefox 15 release, which now <a href=\"https:\/\/blog.mozilla.org\/futurereleases\/2012\/08\/28\/more-on-firefox-memory-improvements\/\" target=\"_blank\">handles them automatically<\/a>.<\/p>\n<p>For the user, this means it is now less likely that an add-on will cause a slowdown in browsing. Add-ons are often cited by our users as the main reason they love Firefox, so it&#8217;s important that we continue to optimize the way Firefox handles their memory usage.<\/p>\n<h3>What does it mean for add-on developers?<\/h3>\n<p>To ensure people continue to have a good browsing experience while using the add-ons they love, please do your part in testing your add-ons. The fix in Firefox 15 handles most instances of Zombie Compartments, but that doesn&#8217;t mean they can&#8217;t still be created.<\/p>\n<p>This <a href=\"https:\/\/developer.mozilla.org\/en\/Zombie_Compartments\" target=\"_blank\">MDN article<\/a> includes pointers on how to find these types of leaks and how to avoid them. The main take-away is this: <strong>don\u2019t hold any references to DOM objects after the document is closed<\/strong>. Your help in testing both the add-ons you&#8217;ve created and the add-ons you use is vital, and greatly appreciated!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The most common type of add-on memory leakage is Zombie Compartments, where\u00a0an add-on accidentally holds on to parts of a web site in memory after a tab is closed, and &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/addons\/2012\/08\/29\/test-your-add-ons-for-memory-leakage\/\">Read more<\/a><\/p>\n","protected":false},"author":377,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44,581],"tags":[12912,12917,12918],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Test your add-ons for memory leakage - Mozilla Add-ons Community Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.mozilla.org\/addons\/2012\/08\/29\/test-your-add-ons-for-memory-leakage\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Amy Tsay\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2012\/08\/29\/test-your-add-ons-for-memory-leakage\/\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/2012\/08\/29\/test-your-add-ons-for-memory-leakage\/\",\"name\":\"Test your add-ons for memory leakage - Mozilla Add-ons Community Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\"},\"datePublished\":\"2012-08-29T20:42:58+00:00\",\"dateModified\":\"2012-08-29T20:42:58+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/becbc6e5c1f9ed8217c36233bc1a7bec\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2012\/08\/29\/test-your-add-ons-for-memory-leakage\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/addons\/2012\/08\/29\/test-your-add-ons-for-memory-leakage\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2012\/08\/29\/test-your-add-ons-for-memory-leakage\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/addons\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Test your add-ons for memory leakage\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/\",\"name\":\"Mozilla Add-ons Community Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.mozilla.org\/addons\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/becbc6e5c1f9ed8217c36233bc1a7bec\",\"name\":\"Amy Tsay\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/db8d681801f2c6406fb3e53d48db2909?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/db8d681801f2c6406fb3e53d48db2909?s=96&d=mm&r=g\",\"caption\":\"Amy Tsay\"},\"description\":\"Lead for Firefox Add-ons at Mozilla.\",\"sameAs\":[\"https:\/\/x.com\/catchingamy\"],\"url\":\"https:\/\/blog.mozilla.org\/addons\/author\/atsaymozilla-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Test your add-ons for memory leakage - Mozilla Add-ons Community Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.mozilla.org\/addons\/2012\/08\/29\/test-your-add-ons-for-memory-leakage\/","twitter_misc":{"Written by":"Amy Tsay","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/addons\/2012\/08\/29\/test-your-add-ons-for-memory-leakage\/","url":"https:\/\/blog.mozilla.org\/addons\/2012\/08\/29\/test-your-add-ons-for-memory-leakage\/","name":"Test your add-ons for memory leakage - Mozilla Add-ons Community Blog","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/addons\/#website"},"datePublished":"2012-08-29T20:42:58+00:00","dateModified":"2012-08-29T20:42:58+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/becbc6e5c1f9ed8217c36233bc1a7bec"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/addons\/2012\/08\/29\/test-your-add-ons-for-memory-leakage\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/addons\/2012\/08\/29\/test-your-add-ons-for-memory-leakage\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/addons\/2012\/08\/29\/test-your-add-ons-for-memory-leakage\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/addons\/"},{"@type":"ListItem","position":2,"name":"Test your add-ons for memory leakage"}]},{"@type":"WebSite","@id":"https:\/\/blog.mozilla.org\/addons\/#website","url":"https:\/\/blog.mozilla.org\/addons\/","name":"Mozilla Add-ons Community Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.mozilla.org\/addons\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/becbc6e5c1f9ed8217c36233bc1a7bec","name":"Amy Tsay","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/db8d681801f2c6406fb3e53d48db2909?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/db8d681801f2c6406fb3e53d48db2909?s=96&d=mm&r=g","caption":"Amy Tsay"},"description":"Lead for Firefox Add-ons at Mozilla.","sameAs":["https:\/\/x.com\/catchingamy"],"url":"https:\/\/blog.mozilla.org\/addons\/author\/atsaymozilla-com\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/5279"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/users\/377"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/comments?post=5279"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/5279\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/media?parent=5279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/categories?post=5279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/tags?post=5279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}