From e40b69de464bc695afcaf7ef9602ad727d77b981 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 10 Feb 2011 02:21:52 +0000 Subject: static analyzer: Make GRStates reference counted, with reference counts managed by ExplodedNodes. This reduces memory usage of the analyzer on sqlite by another 5%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125260 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/StaticAnalyzer/Core/ExplodedGraph.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/StaticAnalyzer/Core/ExplodedGraph.cpp') diff --git a/lib/StaticAnalyzer/Core/ExplodedGraph.cpp b/lib/StaticAnalyzer/Core/ExplodedGraph.cpp index 84fcacab63..3ce50d6539 100644 --- a/lib/StaticAnalyzer/Core/ExplodedGraph.cpp +++ b/lib/StaticAnalyzer/Core/ExplodedGraph.cpp @@ -123,6 +123,8 @@ void ExplodedGraph::reclaimRecentlyAllocatedNodes() { freeNodes = new NodeList(); getNodeList(freeNodes)->push_back(node); Nodes.RemoveNode(node); + --NumNodes; + node->~ExplodedNode(); } nl.clear(); -- cgit v1.2.3