webengine/osswebengine/JavaScriptCore/kjs/nodes.cpp
changeset 13 10e98eab6f85
parent 0 dd21522fd290
child 74 91031d3aab7d
equal deleted inserted replaced
8:7c90e6132015 13:10e98eab6f85
   111 static NodeCounter nodeCounter;
   111 static NodeCounter nodeCounter;
   112 #endif
   112 #endif
   113 
   113 
   114 static HashSet<Node*>* newNodes;
   114 static HashSet<Node*>* newNodes;
   115 static HashCountedSet<Node*>* nodeExtraRefCounts;
   115 static HashCountedSet<Node*>* nodeExtraRefCounts;
       
   116 
       
   117 struct cleanupNodes {
       
   118     ~cleanupNodes() {
       
   119     	if(nodeExtraRefCounts)
       
   120     		nodeExtraRefCounts->clear();
       
   121         delete nodeExtraRefCounts;
       
   122         nodeExtraRefCounts = NULL;
       
   123         
       
   124         if(newNodes)
       
   125             newNodes->clear();
       
   126         delete newNodes;
       
   127         newNodes = NULL;
       
   128     }
       
   129 };
       
   130 static cleanupNodes deletenodeExtraRefCounts;
   116 
   131 
   117 Node::Node()
   132 Node::Node()
   118 {
   133 {
   119 #ifndef NDEBUG
   134 #ifndef NDEBUG
   120     ++NodeCounter::count;
   135     ++NodeCounter::count;