Commit e1c15905 authored by Pavel Vainerman's avatar Pavel Vainerman

Coverity scan:

[ fixed ] CID 22705: Resource leak (RESOURCE_LEAK)
parent db06f342
...@@ -269,19 +269,19 @@ class DebugStream : public std::ostream ...@@ -269,19 +269,19 @@ class DebugStream : public std::ostream
// private: // private:
/// The current debug level /// The current debug level
Debug::type dt; Debug::type dt = { Debug::NONE };
/// The no-op stream. /// The no-op stream.
std::ostream nullstream; std::ostream nullstream;
/// ///
struct debugstream_internal; struct debugstream_internal;
/// ///
debugstream_internal* internal; debugstream_internal* internal = { 0 };
bool show_datetime; bool show_datetime = { true };
bool show_logtype; bool show_logtype = { true };
std::string fname; std::string fname = { "" };
StreamEvent_Signal s_stream; StreamEvent_Signal s_stream;
std::string logname; std::string logname = { "" };
bool isWriteLogFile = { false }; bool isWriteLogFile = { false };
}; };
......
...@@ -43,7 +43,7 @@ using std::ios; ...@@ -43,7 +43,7 @@ using std::ios;
/// Constructor, sets the debug level to t. /// Constructor, sets the debug level to t.
DebugStream::DebugStream(Debug::type t) DebugStream::DebugStream(Debug::type t)
: ostream(new debugbuf(cerr.rdbuf())), : /* ostream(new debugbuf(cerr.rdbuf())),*/
dt(t), nullstream(new nullbuf), internal(new debugstream_internal), dt(t), nullstream(new nullbuf), internal(new debugstream_internal),
show_datetime(true), show_logtype(true), show_datetime(true), show_logtype(true),
fname(""), fname(""),
...@@ -56,7 +56,7 @@ DebugStream::DebugStream(Debug::type t) ...@@ -56,7 +56,7 @@ DebugStream::DebugStream(Debug::type t)
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
/// Constructor, sets the log file to f, and the debug level to t. /// Constructor, sets the log file to f, and the debug level to t.
DebugStream::DebugStream(char const* f, Debug::type t, bool truncate ) DebugStream::DebugStream(char const* f, Debug::type t, bool truncate )
: ostream(new debugbuf(cerr.rdbuf())), : /* ostream(new debugbuf(cerr.rdbuf())), */
dt(t), nullstream(new nullbuf), dt(t), nullstream(new nullbuf),
internal(new debugstream_internal), internal(new debugstream_internal),
show_datetime(true), show_logtype(true), show_datetime(true), show_logtype(true),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment