- some more memory cleanup
This commit is contained in:
parent
c1ee5df801
commit
7dcb12ff60
|
@ -34,6 +34,7 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "sound_renderer.h"
|
#include "sound_renderer.h"
|
||||||
#include "font_gl.h"
|
#include "font_gl.h"
|
||||||
|
#include "FileReader.h"
|
||||||
#include "cache_manager.h"
|
#include "cache_manager.h"
|
||||||
|
|
||||||
// For gcc backtrace on crash!
|
// For gcc backtrace on crash!
|
||||||
|
|
|
@ -43,6 +43,12 @@ UnitPathBasic::UnitPathBasic() {
|
||||||
this->lastPathCacheQueue.clear();
|
this->lastPathCacheQueue.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UnitPathBasic::~UnitPathBasic() {
|
||||||
|
this->blockCount = 0;
|
||||||
|
this->pathQueue.clear();
|
||||||
|
this->lastPathCacheQueue.clear();
|
||||||
|
}
|
||||||
|
|
||||||
bool UnitPathBasic::isEmpty() const {
|
bool UnitPathBasic::isEmpty() const {
|
||||||
return pathQueue.empty();
|
return pathQueue.empty();
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,6 +133,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
UnitPathBasic();
|
UnitPathBasic();
|
||||||
|
virtual ~UnitPathBasic();
|
||||||
virtual bool isBlocked() const;
|
virtual bool isBlocked() const;
|
||||||
virtual bool isEmpty() const;
|
virtual bool isEmpty() const;
|
||||||
virtual bool isStuck() const;
|
virtual bool isStuck() const;
|
||||||
|
|
|
@ -135,9 +135,6 @@ public:
|
||||||
virtual T* read(ifstream& file, const string& path, T* former) const = 0;
|
virtual T* read(ifstream& file, const string& path, T* former) const = 0;
|
||||||
|
|
||||||
virtual ~FileReader() {
|
virtual ~FileReader() {
|
||||||
/*for (typename vector<FileReader<T> const * >::const_iterator i = fileReaders.begin(); i != fileReaders.end(); ++i) {
|
|
||||||
delete const_cast<FileReader<T>* >(*i); //Segfault
|
|
||||||
}*/
|
|
||||||
}; //Well ... these objects aren't supposed to be destroyed
|
}; //Well ... these objects aren't supposed to be destroyed
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue