
28 Aug
2009
28 Aug
'09
1:25 p.m.
Hi, I have a question concerning the remove function of managed_shared_memory. Actually I am not able to remove a segment of shared memory. See the following example. It writes 0 to the output stream. But why? #include <boost/interprocess/managed_shared_memory.hpp> #include <iostream> int main() { boost::interprocess::managed_shared_memory * managed_shm; managed_shm = new boost::interprocess::managed_shared_memory(boost::interprocess::open_or_create, "TestMem", 1024); delete managed_shm; std::cerr << boost::interprocess::shared_memory_object::remove("TestMem") << std::endl; }