| 737 | } |
| 738 | |
| 739 | void CLocatorAPI::_destroy() |
| 740 | { |
| 741 | for (const auto& file : files) |
| 742 | { |
| 743 | free_file(file); |
| 744 | } |
| 745 | files.clear(); |
| 746 | for (auto& pathe : pathes) |
| 747 | { |
| 748 | char* str = LPSTR(pathe.first); |
| 749 | xr_free(str); |
| 750 | xr_delete(pathe.second); |
| 751 | } |
| 752 | pathes.clear(); |
| 753 | for (auto& archive : archives) |
| 754 | { |
| 755 | archive.cleanup(); |
| 756 | archive.close(); |
| 757 | } |
| 758 | archives.clear(); |
| 759 | |
| 760 | if (gamedata_unused_references) |
| 761 | { |
| 762 | gamedata_unused_references->save_as(); |
| 763 | xr_delete(gamedata_unused_references); |
| 764 | } |
| 765 | } |
| 766 | |
| 767 | const CLocatorAPI::file* CLocatorAPI::exist(const char* fn) |
| 768 | { |