reduce memory usage by deleting RI's buffer after parsing and saving

This commit is contained in:
orignal 2014-07-21 22:59:57 -04:00
parent 6dbf8d1457
commit 3a8d4403f6
3 changed files with 27 additions and 6 deletions

View file

@ -264,6 +264,7 @@ namespace data
#else
RouterInfo * r = new RouterInfo(it1->path().c_str());
#endif
r->DeleteBuffer ();
m_RouterInfos[r->GetIdentHash ()] = r;
if (r->IsFloodfill ())
m_Floodfills.push_back (r);
@ -305,6 +306,7 @@ namespace data
{
it.second->SaveToFile (GetFilePath(fullDirectory, it.second));
it.second->SetUpdated (false);
it.second->DeleteBuffer ();
count++;
}
else