| 105 | } |
| 106 | |
| 107 | bool JASHeap::free() { |
| 108 | JASMutexLock lock(&mMutex); |
| 109 | if (!isAllocated()) { |
| 110 | return false; |
| 111 | } |
| 112 | JSUTreeIterator<JASHeap> stack_20; |
| 113 | for (JSUTreeIterator<JASHeap> it(mTree.getFirstChild()); it != mTree.getEndChild(); it = stack_20) { |
| 114 | stack_20 = it; |
| 115 | stack_20++; |
| 116 | it->free(); |
| 117 | } |
| 118 | JSUTree<JASHeap> *parentTree = mTree.getParent(); |
| 119 | if (parentTree) { |
| 120 | JASHeap *parentHeap = parentTree->getObject(); |
| 121 | if (parentHeap->_40 == this) { |
| 122 | JSUTreeIterator<JASHeap> stack_28(mTree.getPrevChild()); |
| 123 | if (stack_28 != mTree.getEndChild()) { |
| 124 | parentHeap->_40 = *stack_28; |
| 125 | } else { |
| 126 | parentHeap->_40 = NULL; |
| 127 | } |
| 128 | } |
| 129 | parentTree->removeChild(&mTree); |
| 130 | } |
| 131 | mBase = NULL; |
| 132 | _40 = NULL; |
| 133 | mSize = 0; |
| 134 | if (mDisposer) { |
| 135 | mDisposer->onDispose(); |
| 136 | } |
| 137 | return true; |
| 138 | } |
| 139 | |
| 140 | void JASHeap::dump() { |
| 141 |
nothing calls this directly
no test coverage detected