Actually delete the lines in AssFile's destructor

This commit is contained in:
Thomas Goyne 2013-09-15 16:58:04 -07:00
parent bfc7f56e20
commit 40a0d8b2f7
1 changed files with 4 additions and 1 deletions

View File

@ -59,7 +59,10 @@ namespace std {
AssFile::~AssFile() { AssFile::~AssFile() {
auto copy = new EntryList; auto copy = new EntryList;
copy->swap(Line); copy->swap(Line);
agi::dispatch::Background().Async([=]{ delete copy; }); agi::dispatch::Background().Async([=]{
copy->clear_and_dispose([](AssEntry *e) { delete e; });
delete copy;
});
} }
void AssFile::LoadDefault(bool defline) { void AssFile::LoadDefault(bool defline) {