|
Boost Users : |
Subject: Re: [Boost-users] [Test] How to treat memory leaks as errors?
From: OvermindDL1 (overminddl1_at_[hidden])
Date: 2009-09-19 18:24:47
2009/9/15 ÐаÑилий СÑаÑоÑÑин <bstarostin_at_[hidden]>:
> Â Â Â Â Â Â Â Â Hi!
>
> I use Boost.Test as testing facility and get "memory leak detected"
> messages every time this happens. And this is good.
>
> However, Boost.Test doesn't return non-zero error code when leaks
> detected (as it does this when tests fail).
>
> How can I make my testing program to return non-zero error code if memory leaked?
Because Boost.Test does not contain anything that can test for memory
leaks. You might want to use something like Google's tcmalloc and so
forth as it can tell you about all that, and you can just add a
Boost.Test testcase at the end of the tests to check for memory leaks
using it.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net