Browse Source

Added a destuctor to CISer to fix some memory leaks.

Frank Zago 16 years ago
parent
commit
21f574f5ee
1 changed files with 8 additions and 0 deletions
  1. 8 0
      lib/Connection.h

+ 8 - 0
lib/Connection.h

@@ -444,6 +444,14 @@ public:
 		myVersion = version;
 	}
 
+	~CISer()
+	{
+		std::map<ui16,CBasicPointerLoader*>::iterator iter;
+			
+		for(iter = loaders.begin(); iter != loaders.end(); iter++)
+			delete iter->second;
+	}
+
 	template<typename T> void registerType(const T * t=NULL)
 	{
 		ui16 ID = typeList.registerType(t);