Mutex must be locked
| 1139 | |
| 1140 | ///Mutex must be locked |
| 1141 | void Set::unrefNode(uint current) |
| 1142 | { |
| 1143 | SetNodeData* data = m_repository->m_dataRepository.dynamicItemFromIndexSimple(current); |
| 1144 | Q_ASSERT(data->m_refCount); |
| 1145 | --data->m_refCount; |
| 1146 | if (!m_repository->delayedDeletion()) { |
| 1147 | if (data->m_refCount == 0) { |
| 1148 | if (data->leftNode()) { |
| 1149 | Q_ASSERT(data->rightNode()); |
| 1150 | unrefNode(data->rightNode()); |
| 1151 | unrefNode(data->leftNode()); |
| 1152 | } else { |
| 1153 | //Deleting a leaf |
| 1154 | Q_ASSERT(data->end() - data->start() == 1); |
| 1155 | m_repository->itemRemovedFromSets(data->start()); |
| 1156 | } |
| 1157 | |
| 1158 | m_repository->m_dataRepository.deleteItem(current); |
| 1159 | } |
| 1160 | } |
| 1161 | } |
| 1162 | |
| 1163 | ///Decrease the static reference-count of this set by one. This set must have a reference-count > 1. |
| 1164 | ///If this set reaches the reference-count zero, it will be deleted, and all sub-nodes that also reach the reference-count zero |
nothing calls this directly
no test coverage detected