1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +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

@@ -57,6 +57,9 @@ class gp_Pnt2d;
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineAlloc_HeaderFile
#include <Standard_DefineAlloc.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
@@ -65,18 +68,8 @@ class BRepPrim_OneAxis {
public:
void* operator new(size_t,void* anAddress)
{
return anAddress;
}
void* operator new(size_t size)
{
return Standard::Allocate(size);
}
void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
DEFINE_STANDARD_ALLOC
// Methods PUBLIC
//
Standard_EXPORT virtual void Delete() ;