placement new + array +alignment
问题 SomeObj<unsigned int>* Buffer; char* BufferPtr = MemoryManager::giveMeSomeBytes(resX*resY*sizeof(SomeObj<unsigned int>)); Buffer = new(BufferPtr) SomeObj<unsigned int>[resX*resY]; when I step past these lines with the debugger, it shows me the values for the variables Buffer and BufferPtr: BufferPtr: 0x0d7f004c Buffer: 0x0d7f0050 I don't really understand why those values differ. The way I understand it, placement new should use the memory starting at address 'BufferPtr' to initialize the