GRAPHICS: MACGUI: Plug memory leak

This commit is contained in:
Eugene Sandulenko 2021-04-30 14:01:17 +02:00
parent 81252598e6
commit cc0cdbbd22
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
3 changed files with 7 additions and 0 deletions

View File

@ -82,6 +82,10 @@ void MacWindowManager::loadDataBundle() {
}
}
void MacWindowManager::cleanupDataBundle() {
delete _dataBundle;
}
BorderOffsets MacWindowManager::getBorderOffsets(byte windowType) {
int i = 0;
while (borders[i].type != 0xFF) {

View File

@ -236,6 +236,8 @@ MacWindowManager::~MacWindowManager() {
delete _desktopBmp;
delete _desktop;
cleanupDataBundle();
g_system->getTimerManager()->removeTimerProc(&menuTimerHandler);
}

View File

@ -306,6 +306,7 @@ public:
void removeMarked();
void loadDataBundle();
void cleanupDataBundle();
BorderOffsets getBorderOffsets(byte windowType);
Common::SeekableReadStream *getBorderFile(byte windowType, uint32 flags);
Common::SeekableReadStream *getFile(const Common::String &filename);