Skip to content

Commit

Permalink
Fixed: Update set of pointing-to vertices for each neighbor of unreac…
Browse files Browse the repository at this point in the history
…hable vertex
  • Loading branch information
m4drat committed Apr 2, 2023
1 parent c2f48df commit 9cec0be
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libmemplusplus/src/containers/gc_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,14 @@ namespace mpp {
for (auto* unreachableGcPtr : curVtxReferences) {
orderedActiveGcPtrs.erase(unreachableGcPtr);
}

// Update set of pointing-to vertices for each neighbor of the unreachable vertex.
for (auto* neighbor : unreachableVtx->GetNeighbors()) {
std::erase_if(neighbor->GetPointingVertices(),
[unreachableVtx](const Vertex* t_vertex) {
return t_vertex == unreachableVtx;
});
}
}

// Do not process this component any further if we don't have any vertices.
Expand Down

0 comments on commit 9cec0be

Please sign in to comment.