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

@@ -75,11 +75,6 @@ if (withDelta) { \
aDelta->AddAttributeDelta(DELTACREATION); \
}
#ifdef WNT
// Disable the warning: "operator new unmatched by delete"
#pragma warning (disable:4291)
#endif
//=======================================================================
//function : TDF_Data
//purpose : empty constructor
@@ -98,10 +93,6 @@ myAllowModification (Standard_True)
myRoot = new (anIncAllocator) TDF_LabelNode (this);
}
#ifdef WNT
#pragma warning (default:4291)
#endif
//=======================================================================
//function : Destroy
//purpose : Used to implement the destructor ~.

View File

@@ -308,11 +308,6 @@ void TDF_Label::EntryDump(Standard_OStream& anOS) const
}
}
#ifdef WNT
// Disable the warning: "operator new unmatched by delete"
#pragma warning (disable:4291)
#endif
//=======================================================================
//function : FindOrAddChild
//purpose : Finds or adds a label child having <aTag> as tag.
@@ -373,10 +368,6 @@ TDF_LabelNode* TDF_Label::FindOrAddChild
return childLabelNode;
}
#ifdef WNT
#pragma warning (default:4291)
#endif
//=======================================================================
//function : InternalDump
//purpose : Private method.

View File

@@ -109,6 +109,12 @@ class TDF_LabelNode {
void * operator new (size_t aSize,
const Handle(NCollection_IncAllocator)& anAlloc)
{ return anAlloc -> Allocate (aSize); }
#if !defined(__BORLANDC__) && (!defined(__SUNPRO_CC) || (__SUNPRO_CC > 0x530))
void operator delete (void* theAddress,
const Handle(NCollection_IncAllocator)& anAlloc)
{
}
#endif
void operator delete(void *) { }
// nothing to do in operator delete since IncAllocator does not need it
// Public Friends
@@ -175,4 +181,4 @@ class TDF_LabelNode {
#endif
};
#endif
#endif