Fix issue with logger
This commit is contained in:
parent
d55c7e3b91
commit
235b36ac47
|
@ -163,9 +163,23 @@ Profiler::Profiler() :mRootNode("Root", nullptr), mDestinations(MemoryManager::g
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
Profiler::~Profiler() {
|
Profiler::~Profiler() {
|
||||||
|
|
||||||
|
removeAllDestinations();
|
||||||
|
|
||||||
destroy();
|
destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove all logs destination previously set
|
||||||
|
void Profiler::removeAllDestinations() {
|
||||||
|
|
||||||
|
// Delete all the destinations
|
||||||
|
for (uint i=0; i<mDestinations.size(); i++) {
|
||||||
|
delete mDestinations[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
mDestinations.clear();
|
||||||
|
}
|
||||||
|
|
||||||
// Method called when we want to start profiling a block of code.
|
// Method called when we want to start profiling a block of code.
|
||||||
void Profiler::startProfilingBlock(const char* name) {
|
void Profiler::startProfilingBlock(const char* name) {
|
||||||
|
|
||||||
|
@ -214,17 +228,6 @@ void Profiler::printReport() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all output profiling destinations previously set
|
|
||||||
void Profiler::removeAllDestinations() {
|
|
||||||
|
|
||||||
// Delete all the destinations
|
|
||||||
for (size_t i=0; i<mDestinations.size(); i++) {
|
|
||||||
delete mDestinations[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
mDestinations.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add a file destination to the profiler
|
// Add a file destination to the profiler
|
||||||
void Profiler::addFileDestination(const std::string& filePath, Format format) {
|
void Profiler::addFileDestination(const std::string& filePath, Format format) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user