|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
Compiler Error C2842
Visual Studio 2005
Error Message'class' : a managed type may not define its own 'operator new' or 'operator delete'
You can define your own operator new or operator delete to manage memory allocation on the native heap. However, reference classes cannot define these operators because they are only allocated on the managed heap.
For more information, see.