ember.js - Ember application memory leak -
i investigating memory leak issue in ember (using ember data) application. issue happens in tests call reset() on ember application after each test has finished. turned out reset() doesn't remove references container before creating new one, resulted in many containers hanging in memory, leakage significant because container keeps controllers , routes in cache.
i use chrome dev tool profile memory , 1 of retaining paths got is: controller:product/create in 27138485 cache in container @27017929 container in @26910113 13 in @26702605 code in function() @26588769 adapterfor in @26498509 prototype in function() @26491127 store in class @26491123 ds in window / localhost:8889/tests @26461671
has there experienced such memory issue ember/ember data well?
i have tried below well:
function setup() { var app = application.createwithmixins({ rootelement: '#ember-testing' }); app.setupfortesting(); app.injecttesthelpers(); return app; }
before each test setup new application
and
function teardown() { ember.run(this.app, 'destroy'); }
to destroy application after each test. still got many references container created previous test.
Comments
Post a Comment