| 327 | } |
| 328 | |
| 329 | void LockCache::Destroy() |
| 330 | { |
| 331 | const int rngX = _lockFields.GetXRange(); |
| 332 | const int rngZ = _lockFields.GetYRange(); |
| 333 | LockField *p, *p2; |
| 334 | for (int i = 0; i < rngZ; i++) |
| 335 | { |
| 336 | for (int j = 0; j < rngX; j++) |
| 337 | { |
| 338 | p = _lockFields(j, i); |
| 339 | if (p) |
| 340 | { |
| 341 | LOG_DEBUG(Core, "Lock field {},{} not empty", i, j); |
| 342 | } |
| 343 | while (p) |
| 344 | { |
| 345 | p2 = p; |
| 346 | p = p->_next; |
| 347 | delete p2; |
| 348 | } |
| 349 | _lockFields(j, i) = 0; |
| 350 | } |
| 351 | } |
| 352 | } |
| 353 | |
| 354 | // static (based on system memory) |
| 355 | // dynamic (based on free system memory) |