Skip to content

Timer object memory leak #24

@Ssabin-devalore

Description

@Ssabin-devalore

Hello,

i seem to have memory leak from using the transition which uses the Timer object.
it's seems to me like it doesn't clean it though i dont keep references to any transition.

I built a live updating graph with d3.js v4.4 and angularjs 1.4.8 displaying nodes and connections which uses transition on updates.

i found out i have memory leaks on my application whether it stays open when i'm on the tab & not on the tab for a long time, i also check with task manager.

i added a screenshot showing my memory heap snap shoot, the Timer object seems to not be cleaning up and i'm really stuck about this.
Heap snapshot
an update flow example:

$interval(() => {
    getSnapshot()
}, 30)

function getSnapshot(timestamp){
    let snapshotTs = timestamp ? timestamp : moment()
    getSnapshotFromServer(snapshotTs).then(data=>{
        graph = data.graph //contains all nodes and connections
        buildGraph(graph)
    })
}

buildGraph(){
    //build graph with connections and nodes using transition
    //we use tr
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions