mirror of https://github.com/mgba-emu/mgba.git
Core: Fix memory leaks in mCacheSet
This commit is contained in:
parent
121376ccb0
commit
6806850441
|
@ -34,12 +34,15 @@ void mCacheSetDeinit(struct mCacheSet* cache) {
|
||||||
for (i = 0; i < mMapCacheSetSize(&cache->maps); ++i) {
|
for (i = 0; i < mMapCacheSetSize(&cache->maps); ++i) {
|
||||||
mMapCacheDeinit(mMapCacheSetGetPointer(&cache->maps, i));
|
mMapCacheDeinit(mMapCacheSetGetPointer(&cache->maps, i));
|
||||||
}
|
}
|
||||||
|
mMapCacheSetDeinit(&cache->maps);
|
||||||
for (i = 0; i < mBitmapCacheSetSize(&cache->bitmaps); ++i) {
|
for (i = 0; i < mBitmapCacheSetSize(&cache->bitmaps); ++i) {
|
||||||
mBitmapCacheDeinit(mBitmapCacheSetGetPointer(&cache->bitmaps, i));
|
mBitmapCacheDeinit(mBitmapCacheSetGetPointer(&cache->bitmaps, i));
|
||||||
}
|
}
|
||||||
|
mBitmapCacheSetDeinit(&cache->bitmaps);
|
||||||
for (i = 0; i < mTileCacheSetSize(&cache->tiles); ++i) {
|
for (i = 0; i < mTileCacheSetSize(&cache->tiles); ++i) {
|
||||||
mTileCacheDeinit(mTileCacheSetGetPointer(&cache->tiles, i));
|
mTileCacheDeinit(mTileCacheSetGetPointer(&cache->tiles, i));
|
||||||
}
|
}
|
||||||
|
mTileCacheSetDeinit(&cache->tiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
void mCacheSetAssignVRAM(struct mCacheSet* cache, void* vram) {
|
void mCacheSetAssignVRAM(struct mCacheSet* cache, void* vram) {
|
||||||
|
|
Loading…
Reference in New Issue