Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Deal with memory leak in gojs diagram

$
0
0

@hamid wrote:

Hi.
I’m struggling with memory leaks in gojs diagram. I have made the diagram and its node/link templates out of the loop. The diagram uses same HTML tag. Within the loop i just make my desired nodes and links in object forms and then assign them to diagram.model.nodeDataArray. In DevTools of chrome in memory profiling timeline I clearly observe remained vertical blueline in any interval.

var nodes = [];
function loop()
{
$.ajax({
url:‘someurl’,
type:‘POST’,
success:function(data){
$.each(data,function(ind,value){
nodes.push({‘key’:value.key,‘text’:value.text});
});
diagram.model.clear();
diagram.model.nodeDataArray = [];
diagram.clear();
diagram.model.nodeDataArray = nodes;
nodes = null;
},
error:function(error){}
});
setTimeOut(function(){loop();},60000);
}

Posts: 6

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles