Skip to content

Commit

Permalink
Reset reference count when destroying logger (issue microsoft#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
facontidavide committed Dec 13, 2018
1 parent e05ad94 commit d6a61ad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/loggers/bt_cout_logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ void StdCoutLogger::callback(Duration timestamp, const TreeNode& node, NodeStatu
void StdCoutLogger::flush()
{
std::cout << std::flush;
ref_count = false;
}

} // end namespace
1 change: 1 addition & 0 deletions src/loggers/bt_minitrace_logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ MinitraceLogger::~MinitraceLogger()
{
minitrace::mtr_flush();
minitrace::mtr_shutdown();
ref_count = false;
}

void MinitraceLogger::callback(Duration /*timestamp*/,
Expand Down
1 change: 1 addition & 0 deletions src/loggers/bt_zmq_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ PublisherZMQ::~PublisherZMQ()
}
flush();
delete zmq_;
ref_count = false;
}


Expand Down

0 comments on commit d6a61ad

Please sign in to comment.