Removes all pages from memory and frees the memory, but does not forget the document metadata.
| 489 | // Removes all pages from memory and frees the memory, but does not forget |
| 490 | // the document metadata. |
| 491 | inT64 DocumentData::UnCache() { |
| 492 | SVAutoLock lock(&pages_mutex_); |
| 493 | inT64 memory_saved = memory_used(); |
| 494 | pages_.clear(); |
| 495 | pages_offset_ = -1; |
| 496 | set_total_pages(-1); |
| 497 | set_memory_used(0); |
| 498 | tprintf("Unloaded document %s, saving %d memory\n", document_name_.string(), |
| 499 | memory_saved); |
| 500 | return memory_saved; |
| 501 | } |
| 502 | |
| 503 | // Locks the pages_mutex_ and Loads as many pages can fit in max_memory_ |
| 504 | // starting at index pages_offset_. |
no test coverage detected