From: <wel...@us...> - 2010-11-09 13:16:19
|
Revision: 6371 http://planeshift.svn.sourceforge.net/planeshift/?rev=6371&view=rev Author: weltall2 Date: 2010-11-09 13:16:13 +0000 (Tue, 09 Nov 2010) Log Message: ----------- some style fixes and removal of elements at shutdown/in case a skill wasn't usable patch by mikesflowers Modified Paths: -------------- trunk/src/common/util/mathscript.h trunk/src/server/cachemanager.cpp Modified: trunk/src/common/util/mathscript.h =================================================================== --- trunk/src/common/util/mathscript.h 2010-11-09 13:14:21 UTC (rev 6370) +++ trunk/src/common/util/mathscript.h 2010-11-09 13:16:13 UTC (rev 6371) @@ -146,6 +146,7 @@ size_t opcode; public: + virtual ~MathExpression() {} /// Empty destructor static MathExpression* Create(const char *expression, const char *name = ""); double Evaluate(const MathEnvironment *env); virtual double Evaluate(MathEnvironment *env) { return Evaluate(const_cast<const MathEnvironment*>(env)); } Modified: trunk/src/server/cachemanager.cpp =================================================================== --- trunk/src/server/cachemanager.cpp 2010-11-09 13:14:21 UTC (rev 6370) +++ trunk/src/server/cachemanager.cpp 2010-11-09 13:16:13 UTC (rev 6371) @@ -397,6 +397,15 @@ } } + { + csHash<psSkillInfo*, int>::GlobalIterator it(skillinfo_IDHash.GetIterator()); + while(it.hasNext()) + delete it.Next(); + skillinfo_IDHash.DeleteAll(); + skillinfo_NameHash.DeleteAll(); + skillinfo_CategoryHash.DeleteAll(); + } + delete lootRandomizer; // ToDo: unload everything else } @@ -611,6 +620,7 @@ else { Error3("Unknown category '%s' for skill id %u",type.GetDataSafe(),newskill->id); + delete newskill; return false; } @@ -2728,7 +2738,6 @@ Error3("Error loading world items.\nQuery: %s\nError: %s",db->GetLastQuery(), db->GetLastError() ); return false; } - for (unsigned long i = 0; i < result.Count(); i++) { psItem *item; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |