fix memory heap checkEdges