- The game is now free of leaks up to the point just after the wads are loaded.
- Fixed: Although TypeInfos are now deleted at exit, their FlatPointers or ActorInfo data was not freed. I chose not to use a destructor to handle this, because then it would no longer be a POD type that can be statically initialized. - Fixed: Aliases were not deleted at exit. - Fixed: FWadCollection did not free its hash tables, lump info, full names, or the list of open files when destroyed. SVN r85 (trunk)
This commit is contained in:
parent
d4160f7211
commit
748d7bf4b1
9 changed files with 151 additions and 50 deletions
|
|
@ -133,6 +133,7 @@ private:
|
|||
struct TypeInfo
|
||||
{
|
||||
static void StaticInit ();
|
||||
static void StaticFreeData (TypeInfo *type);
|
||||
|
||||
const char *Name;
|
||||
TypeInfo *ParentType;
|
||||
|
|
@ -142,6 +143,7 @@ struct TypeInfo
|
|||
FActorInfo *ActorInfo;
|
||||
unsigned int HashNext;
|
||||
unsigned short TypeIndex;
|
||||
bool bRuntimeClass; // class was defined at run-time, not compile-time
|
||||
FMetaTable Meta;
|
||||
const size_t *FlatPointers; // object pointers defined by this class and all its superclasses; not initialized by default
|
||||
|
||||
|
|
@ -169,16 +171,8 @@ struct TypeInfo
|
|||
static const TypeInfo *FindType (const char *name);
|
||||
static const TypeInfo *IFindType (const char *name);
|
||||
|
||||
// The DeletingArray deletes all the TypeInfos it points to
|
||||
// when it gets destroyed.
|
||||
class DeletingArray : public TArray<TypeInfo *>
|
||||
{
|
||||
public:
|
||||
~DeletingArray();
|
||||
};
|
||||
|
||||
static TArray<TypeInfo *> m_Types;
|
||||
static DeletingArray m_RuntimeActors;
|
||||
static TArray<TypeInfo *> m_RuntimeActors;
|
||||
|
||||
enum { HASH_SIZE = 256 };
|
||||
static unsigned int TypeHash[HASH_SIZE];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue