PDA

View Full Version : new vs QSharedMemory



JovianGhost
14th March 2010, 23:55
I need to allocate a chunk of memory for reading and writing data. I notice that Qt has a QSharedMemory class, which seems to do just that. But how efficient is it? How much overhead does it have?

I wonder if I should use it, or if I should just stick with the new operator?

wysota
15th March 2010, 01:47
I don't think QSharedMemory does what you want. It is for sharing a bunch of bytes between different processes. That's something totally different than the new operator.

JovianGhost
17th March 2010, 00:34
Got it, I'll just stick with new, thanks.