|
From: Fredrik K. <sci...@us...> - 2010-08-28 17:10:21
|
Module: performous
Branch: master
Commit: 4502574d87357279f2c84251515a2d35efe021b8
Author: Fredrik Klasson <fr...@li...>
Date: Sat Aug 28 19:09:47 2010 +0200
[ ] Updating comment about logger::teardown. More in sync with reality this way.
---
game/log.cc | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/game/log.cc b/game/log.cc
index 9029c52..375ece5 100644
--- a/game/log.cc
+++ b/game/log.cc
@@ -115,8 +115,7 @@ namespace logger {
std::clog << "logger/info: Log level is: " << level_regexp_str << std::endl;
}
- /* this function might not be called, it's ok not to call it at regular shutdown.
- * This is mainly for debugging purposes. */
+ // Note: not calling this at exit time introduces a use/dtor-race, which may cause a crash.
void teardown(){
if(__default_ClogBuf == 0) throw std::runtime_error("Internal logger error #2");
if(level_regex == 0) throw std::runtime_error("Internal logger error #3");
|