diff --git a/src/fdcache.cpp b/src/fdcache.cpp index 2593b5a..a211c42 100644 --- a/src/fdcache.cpp +++ b/src/fdcache.cpp @@ -276,6 +276,7 @@ bool PageList::Compress(void) fdpage_list_t::iterator biter = iter; --biter; (*biter)->bytes += (*iter)->bytes; + delete *iter; iter = pages.erase(iter); }else{ is_last_loaded = (*iter)->loaded; @@ -322,6 +323,7 @@ bool PageList::Resize(size_t size, bool is_loaded) ++iter; }else{ if(size <= static_cast((*iter)->offset)){ + delete *iter; iter = pages.erase(iter); }else{ (*iter)->bytes = size - static_cast((*iter)->offset);