| 157 | } |
| 158 | |
| 159 | void DsqlStatementCache::removeStatement(thread_db* tdbb, DsqlStatement* statement) |
| 160 | { |
| 161 | if (const auto cacheKey = statement->getCacheKey()) |
| 162 | { |
| 163 | if (const auto entryPtr = map.get(cacheKey)) |
| 164 | { |
| 165 | const auto entry = *entryPtr; |
| 166 | |
| 167 | map.remove(entry->key); |
| 168 | entry->dsqlStatement->resetCacheKey(); |
| 169 | |
| 170 | if (entry->active) |
| 171 | { |
| 172 | entry->dsqlStatement->addRef(); |
| 173 | activeStatementList.erase(entry); |
| 174 | } |
| 175 | else |
| 176 | { |
| 177 | cacheSize -= entry->size; |
| 178 | inactiveStatementList.erase(entry); |
| 179 | } |
| 180 | } |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | void DsqlStatementCache::statementGoingInactive(Firebird::RefStrPtr& key) |
| 185 | { |
no test coverage detected