[mlpack-git] [mlpack] removing global dependency on cli deleter (#521)

Ryan Curtin notifications at github.com
Mon Feb 22 19:15:26 EST 2016


Okay, I played around with it, and I agree that your solution is the more elegant one.  In fact I think that's what we tried first, but it still gives the mangled output at program exit.

I believe this is because the CLI singleton is getting deleted before the Log::Info objects.  There are maybe a couple things we can do here, including bypassing Log::Info for printing the timers and other information in `CLI::~CLI()` and just assembling the prefix string directly, or refactoring things such that the Log objects are guaranteed to be deleted after the CLI singleton.

I'm uncertain why the CLIDeleter solution even worked in light of this... why was the CLIDeleter object (which was also allocated on the heap as a global variable) consistently deleted after the four static Log objects, but this is not true for the CLI object?

Anyway, if you want to go ahead and remove CLIDeleter but come up with some way to still print the output correctly, I'd be more than happy to merge it.

(Sorry for the slow response.  Last week I didn't end up getting to this.)

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/521#issuecomment-187446957
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160222/605b8f2d/attachment.html>


More information about the mlpack-git mailing list