mirror of
https://github.com/glest/glest-source.git
synced 2025-08-11 10:54:01 +02:00
- got built in memory leak working. Just edit leak_dumper.h and uncomment:
//#define SL_LEAK_DUMP - got better / more accurate stack dumps when we detect errors in game. - Both of these need to be worked on in windows next, win32 may not compile for now until i fix it on that platform. - BE VERY CAREFUL when working in leak_dumper.* it may cause GCC and your system to crash if you don't know what you are doing!
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include "platform_util.h"
|
||||
#include "leak_dumper.h"
|
||||
|
||||
using std::map;
|
||||
@@ -72,7 +73,7 @@ public:
|
||||
T *newInstance(string classId){
|
||||
Factories::iterator it= factories.find(classId);
|
||||
if(it == factories.end()){
|
||||
throw runtime_error("Unknown class identifier: " + classId);
|
||||
throw megaglest_runtime_error("Unknown class identifier: " + classId);
|
||||
}
|
||||
return static_cast<T*>(it->second->newInstance());
|
||||
}
|
||||
|
Reference in New Issue
Block a user