0

Memory leak on LoggerSetting

asked 2014-10-14 23:57:36 -0700

jbyu gravatar image

I try to release memory allocated by LoggerSetting, but the destructor is private method. Is there any way to release it without modify source?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-10-15 09:37:52 -0700

stevek gravatar image

LoggerSetting is a singleton because it provides state information to the debug print system used throughout the AllJoyn code base. That state information must persist over the lifetime of the program. If you were to destroy LoggerSetting too soon, you'd crash AllJoyn code.

For the upcoming 14.12 release there is a new static member function in LoggerSetting called Cleanup() which may be called just prior to your program exiting that will destroy the LoggerSetting singleton. Do be careful in calling that as it should only be called once and only after all AllJoyn code has stopped and your application is about to exit.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2014-10-14 23:57:36 -0700

Seen: 41 times

Last updated: Oct 15 '14