1
0
Fork 0

Codefix: Delete PersistentStorage when a town is deleted.

pull/12903/head
Peter Nelson 2024-08-18 20:57:33 +01:00
parent e4c04e86c0
commit 78a5715bf1
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
1 changed files with 3 additions and 0 deletions

View File

@ -148,6 +148,9 @@ Town::~Town()
}
/* Clear the persistent storage list. */
for (auto &psa : this->psa_list) {
delete psa;
}
this->psa_list.clear();
DeleteSubsidyWith(SourceType::Town, this->index);