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

@@ -8,6 +8,9 @@
#ifndef _Handle_Standard_Persistent_HeaderFile
#define _Handle_Standard_Persistent_HeaderFile
#ifndef _Standard_DefineAlloc_HeaderFile
#include <Standard_DefineAlloc.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
@@ -38,8 +41,6 @@ class Handle_Standard_Persistent;
Standard_EXPORT Standard_Integer HashCode(const Handle(Standard_Persistent)& ,
const Standard_Integer);
Standard_EXPORT Standard_Address StandardCSFDB_Allocate(const Standard_Size);
Standard_EXPORT void StandardCSFDB_Free(Standard_Address&);
class Handle(Standard_Persistent)
{
@@ -69,18 +70,7 @@ class Handle(Standard_Persistent)
public:
void* operator new(size_t,void* anAddress)
{
return anAddress;
}
void* operator new(size_t size)
{
return StandardCSFDB_Allocate(size);
}
void operator delete(void *anAddress)
{
if (anAddress) StandardCSFDB_Free(anAddress);
}
DEFINE_STANDARD_ALLOC
Handle(Standard_Persistent)()
{