JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://github.com/downloads/wycats/handlebars.js/handlebars-1.0.0.beta.6.js"></script>
<script src="https://github.com/downloads/emberjs/ember.js/ember-1.0.pre.js"></script>
JavaScript
App = Ember.Application.create();
App.TestObj = Ember.Object.extend({
testProp: null,
init: function() {
this.set('testProp', []);
this._super();
console.log('before init', this.get('testProp'));
this.get('testProp').pushObject({'test': true});
},
willDestroy: function() {
console.log('before destroy', this.get('testProp'));
this._super();
this.set('testProp', []);
console.log('after destroy',this.get('testProp'));
}
});
var test = App.TestObj.create();
test.destroy();
App.TestObj.create();