For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

"new" operation

Wang Chris's picture

Can someone help me: why the "new" operation cannot work in Debug version, while ok in Release version?

Example: (in Debug version)
Handle(AIS_Shape) aBox1 = new AIS_Shape(B1); error:
error C2661: 'Standard_Transient::operator new' : no overloaded function takes 3 arguments

Svetlozar Kostadinov's picture

Do you use MFC? It redefines the "new" operator in debug version to track the memory allocations. In every cpp the MFC wizzard adds the following snippet:

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;

If you have this, try to comment it.

Wang Chris's picture

Thanks a lot! It works :-)