message_queue memory leak in Boost::test

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:

On 2013-04-04 00:14, John Davies wrote:
Is this something I have to live with? In my real code the message_queue is alive the whole time the program is running.
Try the following (quoted from the documentation) "The message queue is explicitly removed calling the static remove function: using boost::interprocess; message_queue::remove("message_queue"); "

"The message queue is explicitly removed calling the static remove function:
using boost::interprocess; message_queue::remove("message_queue"); "
My original code had a call to remove(). I tried changing it to message_queue::remove() but it didn't make a difference. So I tried std::cout<< message_queue::remove("InQueue") and it returns true - meaning that the queue was removed.

[Please do not mail me a copy of your followup]
boost-users@lists.boost.org spake the secret code
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:
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.
Have you tried reporting the leak to the owner of the interprocess library? -- "The Direct3D Graphics Pipeline" free book http://tinyurl.com/d3d-pipeline The Computer Graphics Museum http://computergraphicsmuseum.org The Terminals Wiki http://terminals.classiccmp.org Legalize Adulthood! (my blog) http://legalizeadulthood.wordpress.com

Looks like it's a user error where the user is me.
participants (3)
-
Bjorn Reese
-
John Davies
-
legalize+jeeves@mail.xmission.com