These are chat archives for canjs/canjs

16th
Feb 2015
Justin Meyer
@justinbmeyer
Feb 16 2015 01:29
I just created a branch for the memory leak: https://github.com/bitovi/canjs/tree/mustache-memory-leak
it hits a debugger when a nodeList is created that is never cleaned up
cc @ jondubois
Jonathan, @ me when you see this and I'll go over a bit of the context
Justin Meyer
@justinbmeyer
Feb 16 2015 01:40
hey @jondubois
Jonathan Gros-Dubois
@jondubois
Feb 16 2015 01:40
@justinbmeyer Ok, I'm looking at it now
Justin Meyer
@justinbmeyer
Feb 16 2015 01:40
Ok, so are you familiar with can.view.nodeList?
Jonathan Gros-Dubois
@jondubois
Feb 16 2015 01:40
No
Is it a can.Map?
I mean List
Justin Meyer
@justinbmeyer
Feb 16 2015 01:41
neither, one sec
got time for a quick hangout? sorry to move this conversation all over the place
Jonathan Gros-Dubois
@jondubois
Feb 16 2015 01:48
Maybe can we do this tomorrow morning (Boston time) I don't have mic?
Justin Meyer
@justinbmeyer
Feb 16 2015 01:51
maybe, I'm going to be pretty busy tomorrow+tuesday and I am leaving on vacation wednesday
basically a node list tracks nodes for live binding
and they generally listen to when nodes are removed
so when you do .empty()
it should trigger a "removed" event
which is picked up by the nodeList
and the nodeList should stop listening to changes in a compute
and remove itself from the global list of all nodeLists
for some reason, some nodeLists are never being cleared
Jonathan Gros-Dubois
@jondubois
Feb 16 2015 01:53
I see
Where is this global list of nodeLists?
Justin Meyer
@justinbmeyer
Feb 16 2015 01:56
can.view.nodeLists.nodeMap
if you run the test I created (which is based off your test, you'll notice a lot of entries in that)
is where I put your test
removed the need for can.Model and can.fixture
I'm pretty sure it's a problem with how nodeLists are handled in {{#each
(which takes place in can/view/live/live.js
Jonathan Gros-Dubois
@jondubois
Feb 16 2015 01:59
Ok
I will look into it this week sometimes and will call if I run into any issue
Justin Meyer
@justinbmeyer
Feb 16 2015 02:16
sounds good