mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
reduce memory usage by deleting RI's buffer after parsing and saving
This commit is contained in:
parent
6dbf8d1457
commit
3a8d4403f6
3 changed files with 27 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue