diff options
author | Matthew Hoops | 2010-02-08 15:51:00 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-02-08 15:51:00 +0000 |
commit | 7147f8577e08bcb037cba390dbef3e90163fb96f (patch) | |
tree | 2ebed6871a7f97b2b8ed92a232092585c2dd6bac /engines/sci/engine/segment.h | |
parent | 6938ca072aa05600ece0b7041e47a0fe8e4abba4 (diff) | |
download | scummvm-rg350-7147f8577e08bcb037cba390dbef3e90163fb96f.tar.gz scummvm-rg350-7147f8577e08bcb037cba390dbef3e90163fb96f.tar.bz2 scummvm-rg350-7147f8577e08bcb037cba390dbef3e90163fb96f.zip |
Search through arrays for outgoing references to fix possible garbage collector problems; minor cleanup.
svn-id: r47989
Diffstat (limited to 'engines/sci/engine/segment.h')
-rw-r--r-- | engines/sci/engine/segment.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h index 8108e0695e..5651e2ef21 100644 --- a/engines/sci/engine/segment.h +++ b/engines/sci/engine/segment.h @@ -796,7 +796,7 @@ public: SciString() : SciArray<char>() { setType(3); } // We overload destroy to ensure the string type is 3 after destroying - void destroy() { _type = 3; } + void destroy() { SciArray<char>::destroy(); _type = 3; } Common::String toString(); void fromString(Common::String string); @@ -805,6 +805,9 @@ public: struct ArrayTable : public Table<SciArray<reg_t> > { ArrayTable() : Table<SciArray<reg_t> >(SEG_TYPE_ARRAY) {} + virtual void freeAtAddress(SegManager *segMan, reg_t sub_addr); + virtual void listAllOutgoingReferences(reg_t object, void *param, NoteCallback note); + void saveLoadWithSerializer(Common::Serializer &ser); SegmentRef dereference(reg_t pointer); }; @@ -812,6 +815,8 @@ struct ArrayTable : public Table<SciArray<reg_t> > { struct StringTable : public Table<SciString> { StringTable() : Table<SciString>(SEG_TYPE_STRING) {} + virtual void freeAtAddress(SegManager *segMan, reg_t sub_addr); + void saveLoadWithSerializer(Common::Serializer &ser); SegmentRef dereference(reg_t pointer); }; |