
27 Jan
2010
27 Jan
'10
9:09 a.m.
Thanks Derek, I should have read the manual more carefully. But nevertheless this behaviour is strange. When one process closes the shared memory, it can not be reopened by another one? Thus the processes are not independent any more. Is there a best practice, how to handle this? I have only one writing process, but several readers. So I call shared_memory_object::remove only when the writer is destroyed. But I have to take care, that the readers are destroyed before the writer is destroyed, otherwise the memory is not freed. But what to do if I have several writers, which could open and close the shared mem, whenever they like to? How do you handle this?