mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 17:33:05 +00:00
SCI: Close Memory Leak from kAnimate Calls.
This was due to a missing destructor in the HunkTable. Thanks to wjp for this patch.
This commit is contained in:
parent
e6080087c8
commit
bcb9179a8b
@ -318,6 +318,12 @@ struct ListTable : public SegmentObjTable<List> {
|
||||
/* HunkTable */
|
||||
struct HunkTable : public SegmentObjTable<Hunk> {
|
||||
HunkTable() : SegmentObjTable<Hunk>(SEG_TYPE_HUNK) {}
|
||||
virtual ~HunkTable() {
|
||||
for (uint i = 0; i < _table.size(); i++) {
|
||||
if (isValidEntry(i))
|
||||
freeEntryContents(i);
|
||||
}
|
||||
}
|
||||
|
||||
void freeEntryContents(int idx) {
|
||||
free(_table[idx].mem);
|
||||
|
Loading…
x
Reference in New Issue
Block a user