Boost logo

Boost Users :

Subject: [Boost-users] message_queue memory leak in Boost::test
From: John Davies (john.davies_at_[hidden])
Date: 2013-04-03 18:14:44


I have this simple test case:

BOOST_AUTO_TEST_CASE(TestLogin)
{
    message_queue inQueue(open_or_create, "InQueue", 100, 100);
    remove("InQueue");
}

And Boost::test reports a memory leak:

Running 1 test case...

*** No errors detected
Detected memory leaks!
Dumping objects ->
{668} normal block at 0x0039DE78, 57 bytes long.
 Data: <struct boost::in> 73 74 72 75 63 74 20 62 6F 6F 73 74 3A 3A 69 6E
{667} normal block at 0x0039DE40, 8 bytes long.
 Data: <x 9 > 78 DE 39 00 00 00 00 00
Object dump complete.
Press any key to continue . . .

If I comment out the two lines of code there is no memory leak.

Is this something I have to live with? In my real code the message_queue is
alive the whole time the program is running.


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