Page 1 of 1

new new[] delete delete[] operators

Posted: Sat Oct 29, 2011 2:37 am
by Skirox
Is is required to implements these operators even if i'm not going to use them?

Re: new new[] delete delete[] operators

Posted: Sat Oct 29, 2011 2:56 am
by Combuster
I you truly don't use array new/delete then there's no need for them.

Your linker will let you know if you screwed up your assumption :wink:

Re: new new[] delete delete[] operators

Posted: Sat Oct 29, 2011 5:21 am
by OSwhatever
Skirox wrote:Is is required to implements these operators even if i'm not going to use them?
No, you can skip implementing those if you want to. You might want to implement placement new so that you can run the constructors of the objects but that's just a few lines of code.