Cleanup memory in the asset archive reader

This commit is contained in:
Ian McInerney 2021-03-19 21:23:35 +00:00
parent 6c3cf33170
commit 7b4890e578
1 changed files with 5 additions and 0 deletions

View File

@ -55,7 +55,10 @@ bool ASSET_ARCHIVE::Load()
while( ( entry = tarStream.GetNextEntry() ) )
{
if( entry->IsDir() )
{
delete entry;
continue;
}
size_t length = entry->GetSize();
@ -71,6 +74,8 @@ bool ASSET_ARCHIVE::Load()
m_fileInfoCache[entry->GetName()] = fi;
offset += length;
delete entry;
}
m_cache.resize( offset );