ros / rosconsole

17 stars 61 forks source link

Add deregistry function for LogAppender. #17

Closed tahsinkose closed 6 years ago

tahsinkose commented 6 years ago

Resolution of memory leak issue in ROSOutAppender requires deregistration of g_rosout_appender. This PR implements that functionality.

dirk-thomas commented 6 years ago

The same function needs to be added to the other backends.

tahsinkose commented 6 years ago

I don't know why build fails, Jenkins shows nothing about the failure. I thought it was because of multiple commits, so squashed them but didn't work either.

dirk-thomas commented 6 years ago

The Jenkins build output contains:

[ 50%] Building CXX object CMakeFiles/rosconsole_log4cxx.dir/src/rosconsole/impl/rosconsole_log4cxx.cpp.o
/tmp/catkin_workspace/src/rosconsole/src/rosconsole/impl/rosconsole_log4cxx.cpp: In function ‘void ros::console::impl::deregister_appender()’:
/tmp/catkin_workspace/src/rosconsole/src/rosconsole/impl/rosconsole_log4cxx.cpp:358:3: error: ‘logger’ was not declared in this scope
   logger->removeAppender(g_log4cxx_appender);
   ^~~~~~
/tmp/catkin_workspace/src/rosconsole/src/rosconsole/impl/rosconsole_log4cxx.cpp:358:3: note: suggested alternative: ‘log1pq’
   logger->removeAppender(g_log4cxx_appender);
   ^~~~~~
   log1pq
tahsinkose commented 6 years ago

Thanks for your patient guidance :)

dirk-thomas commented 6 years ago

Thank you for adding this feature.