| 183 | |
| 184 | void AddRef() { count++;} |
| 185 | void RemoveRef(ScopedSpinLock& _lock) { |
| 186 | ASSERT(0 < count); |
| 187 | ASSERT(_lock.islocked()); |
| 188 | |
| 189 | bool willdel = false; |
| 190 | count--; |
| 191 | |
| 192 | if (0 == count) willdel = true; |
| 193 | |
| 194 | _lock.unlock(); |
| 195 | |
| 196 | if (willdel) delete this; |
| 197 | } |
| 198 | |
| 199 | private: |
| 200 | RunnableReference(const RunnableReference&); |
no test coverage detected