Search through arrays for outgoing references to fix possible garbage collector problems; minor cleanup.

svn-id: r47989
This commit is contained in:
Matthew Hoops 2010-02-08 15:51:00 +00:00
parent 6938ca072a
commit 7147f8577e
3 changed files with 33 additions and 5 deletions

View file

@ -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);
};