| 380 | } |
| 381 | |
| 382 | void BfParserData::Deref() |
| 383 | { |
| 384 | mRefCount--; |
| 385 | BF_ASSERT(mRefCount >= 0); |
| 386 | if (mRefCount == 0) |
| 387 | { |
| 388 | AutoCrit autoCrit(gBfParserCache->mCritSect); |
| 389 | BfParserCache::DataEntry dataEntry; |
| 390 | dataEntry.mParserData = this; |
| 391 | bool didRemove = gBfParserCache->mEntries.Remove(dataEntry); |
| 392 | BF_ASSERT(didRemove); |
| 393 | delete this; |
| 394 | } |
| 395 | } |
| 396 | |
| 397 | ////////////////////////////////////////////////////////////////////////// |
| 398 |
no test coverage detected