Changeset 15190 for trunk/ippTools/src/pxtree.c
- Timestamp:
- Oct 3, 2007, 1:25:52 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/pxtree.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/pxtree.c
r15187 r15190 65 65 // if the child already has a parent, release the ref count 66 66 if (child->parent) { 67 ps MemDecrRefCounter(child->parent);67 psFree(child->parent); 68 68 } 69 69 // [re]parent the child … … 167 167 // add it to the hash of nodes 168 168 psHashAdd(nodeNames, item->name, node); 169 // node may be used below because it will still have a ref count of 170 // 1 from being on the hash, this is equivalent to the "view" we 171 // get from a hashlookup 172 psFree(node); 169 173 } 170 174 … … 178 182 // add it to the hash of nodes 179 183 psHashAdd(nodeNames, item->data.str, child); 184 // child may be used below because it will still have a ref 185 // count of 1 from being on the hash, this is equivalent to the 186 // "view" we get from a hashlookup 187 psFree(child); 180 188 } 181 189 pxNodeAddChild(node, child); 182 190 } 183 184 psFree(node);185 191 } 186 192 psFree(iter); … … 189 195 psFree(nodeNames); 190 196 191 return root;197 return psMemIncrRefCounter(root); 192 198 }
Note:
See TracChangeset
for help on using the changeset viewer.
