
27 Mar
2009
27 Mar
'09
3:56 p.m.
Oncaphillis wrote:
Hi,
I'm using boost::interprocess (1.37) and would like to construct a couple of anonymous objects. The idea is to construct a named object via
Object *o segment.find_or_construct<Object>("theObject")();
http://www.boost.org/doc/libs/1_38_0/doc/html/interprocess/managed_memory_se... **************************** using namespace boost::interprocess; MyType *ptr = managed_memory_segment.construct<MyType>(anonymous_instance) (par1, par2...); //Other construct variants can also be used //(including non-throwing ones) //We can only destroy the anonymous object via pointer managed_memory_segment.destroy_ptr(ptr); **************************** Best, Ion