1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0022815: Missing delete operator for placement new

This commit is contained in:
dbv
2012-03-06 12:32:06 +04:00
committed by bugmaster
parent 59f45b7cef
commit 1c35b92f5f
115 changed files with 280 additions and 868 deletions

View File

@@ -15,8 +15,8 @@
#include <Bnd_B3f.hxx>
#ifdef WNT
// Disable the warning "operator new unmatched by delete"
#pragma warning (push)
// Disable warning 4480: nonstandard extension used: specifying underlying type for enum 'enum'
#pragma warning (disable:4480)
#endif

View File

@@ -10,12 +10,6 @@
#include <NIS_InteractiveObject.hxx>
#include <Quantity_Color.hxx>
#ifdef WNT
// Disable the warning "operator new unmatched by delete"
#pragma warning (push)
#pragma warning (disable:4291)
#endif
class Handle_NIS_TriangulatedDrawer;
class NCollection_BaseAllocator;
class Handle_NCollection_BaseAllocator;
@@ -465,24 +459,13 @@ class NIS_Triangulated : public NIS_InteractiveObject
*/
Standard_EXPORT virtual void Delete () const;
/**
* Operator new for memory allocation uses Open CASCADE memory manager
*/
void* operator new (size_t size)
{
return Standard::Allocate(size);
}
protected:
/**
* Allocator-based operator new for dynamic allocations in method Clone()
*/
void* operator new (Standard_Size theSz,
const Handle(NCollection_BaseAllocator)& theAllocator)
{
return theAllocator->Allocate(theSz);
}
DEFINE_STANDARD_ALLOC
DEFINE_NCOLLECTION_ALLOC
/**
* Create a 3D bounding box of the object.
@@ -536,8 +519,4 @@ DEFINE_STANDARD_RTTI (NIS_Triangulated)
// Definition of HANDLE object using Standard_DefineHandle.hxx
DEFINE_STANDARD_HANDLE (NIS_Triangulated, NIS_InteractiveObject)
#ifdef WNT
#pragma warning (pop)
#endif
#endif