Last active
March 28, 2017 00:28
-
-
Save les2/5b083584c933e4c887fc1f0f7360e6df to your computer and use it in GitHub Desktop.
object-proxy-memory-leak?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Ember from 'ember'; | |
| export default Ember.Controller.extend({ | |
| appName: 'Ember Twiddle', | |
| modelProxy: null, | |
| updateCount: 0, | |
| setupProxy: Ember.on('init', function() { | |
| this.updateProxy(); | |
| }), | |
| updateProxy() { | |
| this.incrementProperty('updateCount'); | |
| var model = this.get('model'); | |
| if (model != null) { | |
| var proxy = Ember.ObjectProxy.create({content: model}); | |
| this.set('modelProxy', proxy); | |
| } | |
| Ember.run.later(this, this.updateProxy, 4); | |
| }, | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Ember from 'ember'; | |
| export default Ember.Route.extend({ | |
| model() { | |
| return Ember.Object.create({a: 1, b: 2, c: 3}); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version": "0.12.1", | |
| "EmberENV": { | |
| "FEATURES": {} | |
| }, | |
| "options": { | |
| "use_pods": false, | |
| "enable-testing": false | |
| }, | |
| "dependencies": { | |
| "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
| "ember": "2.12.0", | |
| "ember-template-compiler": "2.12.0", | |
| "ember-testing": "2.12.0" | |
| }, | |
| "addons": { | |
| "ember-data": "2.9.0" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment