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:
@@ -8,7 +8,7 @@
|
||||
#include <Poly_CoherentTriangle.hxx>
|
||||
|
||||
#ifdef WNT
|
||||
#pragma warning(disable:4291 4996)
|
||||
#pragma warning(disable:4996)
|
||||
#endif
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -6,10 +6,6 @@
|
||||
|
||||
#include <Poly_CoherentTriPtr.hxx>
|
||||
|
||||
#ifdef WNT
|
||||
#pragma warning(disable:4291)
|
||||
#endif
|
||||
|
||||
//=======================================================================
|
||||
//function : Iterator::Next
|
||||
//purpose :
|
||||
|
@@ -8,12 +8,13 @@
|
||||
#define Poly_CoherentTriPtr_HeaderFile
|
||||
|
||||
#include <NCollection_BaseAllocator.hxx>
|
||||
#include <NCollection_DefineAlloc.hxx>
|
||||
|
||||
class Poly_CoherentTriangle;
|
||||
|
||||
#ifdef WNT
|
||||
#pragma warning (push)
|
||||
#pragma warning(disable:4355 4291) //'this' : used in base member initializer list
|
||||
#pragma warning(disable:4355) //'this' : used in base member initializer list
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -78,11 +79,7 @@ class Poly_CoherentTriPtr
|
||||
/**
|
||||
* Operator new for dynamic allocations
|
||||
*/
|
||||
void* operator new (Standard_Size theSize,
|
||||
const Handle(NCollection_BaseAllocator)& theAllocator)
|
||||
{
|
||||
return theAllocator->Allocate(theSize);
|
||||
}
|
||||
DEFINE_NCOLLECTION_ALLOC
|
||||
|
||||
/**
|
||||
* Query the stored pointer to Triangle.
|
||||
|
@@ -22,13 +22,7 @@ struct polyedge {
|
||||
Standard_Integer nd; // the second node of the edge
|
||||
Standard_Integer nt[2]; // the two adjacent triangles
|
||||
Standard_Integer nn[2]; // the two adjacent nodes
|
||||
void* operator new(size_t aSize)
|
||||
{return (void*)(Standard::Allocate(aSize));}
|
||||
// void operator delete(void* aNode, size_t aSize) {
|
||||
void operator delete(void* aNode) {
|
||||
Standard_Address anAdress = (Standard_Address)aNode;
|
||||
Standard::Free(anAdress);
|
||||
}
|
||||
DEFINE_STANDARD_ALLOC
|
||||
};
|
||||
|
||||
Poly_Connect::Poly_Connect(const Handle(Poly_Triangulation)& T) :
|
||||
|
Reference in New Issue
Block a user