0022815: Missing delete operator for placement new
authordbv <dbv@opencascade.com>
Tue, 6 Mar 2012 08:32:06 +0000 (12:32 +0400)
committerbugmaster <bugmaster@opencascade.com>
Tue, 6 Mar 2012 13:25:00 +0000 (17:25 +0400)
115 files changed:
src/BRepExtrema/BRepExtrema_DistShapeShape.hxx
src/BRepExtrema/BRepExtrema_DistanceSS.hxx
src/BRepExtrema/BRepExtrema_ExtCC.hxx
src/BRepExtrema/BRepExtrema_ExtCF.hxx
src/BRepExtrema/BRepExtrema_ExtFF.hxx
src/BRepExtrema/BRepExtrema_ExtPC.hxx
src/BRepExtrema/BRepExtrema_ExtPF.hxx
src/BRepExtrema/BRepExtrema_SolutionElem.hxx
src/BRepPrim/BRepPrim_OneAxis.hxx
src/BRepSweep/BRepSweep_NumLinearRegularSweep.hxx
src/DBC/DBC_VArray.gxx
src/InterfaceGraphic/InterfaceGraphic_degeneration.hxx
src/InterfaceGraphic/InterfaceGraphic_telem.hxx
src/LDOM/LDOM_BasicAttribute.cxx
src/LDOM/LDOM_BasicAttribute.hxx
src/LDOM/LDOM_BasicElement.cxx
src/LDOM/LDOM_BasicElement.hxx
src/LDOM/LDOM_BasicNode.hxx
src/LDOM/LDOM_BasicText.cxx
src/LDOM/LDOM_BasicText.hxx
src/NCollection/FILES
src/NCollection/NCollection_Array1.hxx
src/NCollection/NCollection_Array2.hxx
src/NCollection/NCollection_BaseCollection.hxx
src/NCollection/NCollection_BaseList.hxx
src/NCollection/NCollection_BaseMap.hxx
src/NCollection/NCollection_CellFilter.hxx
src/NCollection/NCollection_DataMap.hxx
src/NCollection/NCollection_DefineAlloc.hxx [new file with mode: 0644]
src/NCollection/NCollection_DefineArray1.hxx
src/NCollection/NCollection_DefineArray2.hxx
src/NCollection/NCollection_DefineDataMap.hxx
src/NCollection/NCollection_DefineDoubleMap.hxx
src/NCollection/NCollection_DefineIndexedDataMap.hxx
src/NCollection/NCollection_DefineIndexedMap.hxx
src/NCollection/NCollection_DefineList.hxx
src/NCollection/NCollection_DefineMap.hxx
src/NCollection/NCollection_DefineQueue.hxx
src/NCollection/NCollection_DefineSList.hxx
src/NCollection/NCollection_DefineSequence.hxx
src/NCollection/NCollection_DefineSet.hxx
src/NCollection/NCollection_DefineStack.hxx
src/NCollection/NCollection_DefineTListIterator.hxx
src/NCollection/NCollection_DefineTListNode.hxx
src/NCollection/NCollection_DefineVector.hxx
src/NCollection/NCollection_DoubleMap.hxx
src/NCollection/NCollection_IndexedDataMap.hxx
src/NCollection/NCollection_IndexedMap.hxx
src/NCollection/NCollection_List.hxx
src/NCollection/NCollection_ListNode.hxx
src/NCollection/NCollection_Map.hxx
src/NCollection/NCollection_Queue.hxx
src/NCollection/NCollection_SList.hxx
src/NCollection/NCollection_Sequence.hxx
src/NCollection/NCollection_Set.hxx
src/NCollection/NCollection_SparseArray.hxx
src/NCollection/NCollection_Stack.hxx
src/NCollection/NCollection_TListIterator.hxx
src/NCollection/NCollection_TListNode.hxx
src/NCollection/NCollection_UBTree.hxx
src/NCollection/NCollection_Vector.hxx
src/NIS/NIS_Drawer.hxx
src/NIS/NIS_Triangulated.hxx
src/OpenGl/OpenGl_AspectFace.hxx
src/OpenGl/OpenGl_AspectLine.hxx
src/OpenGl/OpenGl_AspectMarker.hxx
src/OpenGl/OpenGl_AspectText.hxx
src/OpenGl/OpenGl_CView.hxx
src/OpenGl/OpenGl_Display.hxx
src/OpenGl/OpenGl_Element.hxx
src/OpenGl/OpenGl_GraduatedTrihedron.hxx
src/OpenGl/OpenGl_Group.hxx
src/OpenGl/OpenGl_Light.hxx
src/OpenGl/OpenGl_Marker.hxx
src/OpenGl/OpenGl_MarkerSet.hxx
src/OpenGl/OpenGl_Matrix.hxx
src/OpenGl/OpenGl_Mesh.hxx
src/OpenGl/OpenGl_Polygon.cxx
src/OpenGl/OpenGl_Polygon.hxx
src/OpenGl/OpenGl_Polyline.hxx
src/OpenGl/OpenGl_PrimitiveArray.hxx
src/OpenGl/OpenGl_PriorityList.hxx
src/OpenGl/OpenGl_QuadrangleStrip.hxx
src/OpenGl/OpenGl_Structure.hxx
src/OpenGl/OpenGl_Text.hxx
src/OpenGl/OpenGl_TextParam.hxx
src/OpenGl/OpenGl_TextureBox.cxx
src/OpenGl/OpenGl_TextureBox.hxx
src/OpenGl/OpenGl_TriangleStrip.hxx
src/OpenGl/OpenGl_Trihedron.hxx
src/OpenGl/OpenGl_View.hxx
src/OpenGl/OpenGl_View_2.cxx
src/OpenGl/OpenGl_Window.hxx
src/OpenGl/OpenGl_Workspace.hxx
src/Poly/Poly_CoherentNode.cxx
src/Poly/Poly_CoherentTriPtr.cxx
src/Poly/Poly_CoherentTriPtr.hxx
src/Poly/Poly_Connect.cxx
src/Standard/FILES
src/Standard/Handle_Standard_Persistent.hxx
src/Standard/Handle_Standard_Transient.hxx
src/Standard/StandardCSFDB.cxx
src/Standard/Standard_DefineAlloc.hxx [new file with mode: 0644]
src/Standard/Standard_Macro.hxx
src/Standard/Standard_Persistent_proto.hxx
src/Standard/Standard_Transient_proto.hxx
src/Standard/Standard_TypeDef.hxx
src/Storage/Storage_BucketOfPersistent.hxx
src/Storage/Storage_Schema.cxx
src/TColStd/TColStd_PackedMapOfInteger.hxx
src/TDF/TDF_Data.cxx
src/TDF/TDF_Label.cxx
src/TDF/TDF_LabelNode.hxx
src/TNaming/TNaming_NamedShape.cxx
src/VoxelClient/VoxelClient_VisDrawer.cxx

index 119f81a..7004352 100644 (file)
@@ -25,6 +25,9 @@
 #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
@@ -76,18 +79,7 @@ class BRepExtrema_DistShapeShape
 {
  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
 
   //! create empty tool <br>
   Standard_EXPORT BRepExtrema_DistShapeShape();
index 522133b..183c7aa 100644 (file)
@@ -25,6 +25,9 @@
 #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
@@ -60,18 +63,7 @@ class BRepExtrema_DistanceSS
 {
  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
 
   //! computes the distance between two Shapes ( face edge vertex). <br>
   Standard_EXPORT BRepExtrema_DistanceSS(const TopoDS_Shape& S1, const TopoDS_Shape& S2,
index a6e2fcd..6e42775 100644 (file)
@@ -9,6 +9,9 @@
 #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
@@ -37,18 +40,7 @@ class BRepExtrema_ExtCC
 {
  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
   
   Standard_EXPORT BRepExtrema_ExtCC()
   {
index 1fb6d62..045e299 100644 (file)
@@ -9,6 +9,9 @@
 #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
@@ -53,18 +56,7 @@ class BRepExtrema_ExtCF
 {
  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
 
   Standard_EXPORT BRepExtrema_ExtCF()
   {
index 9e2035e..f754721 100644 (file)
@@ -9,6 +9,9 @@
 #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
@@ -47,19 +50,7 @@ class BRepExtrema_ExtFF
 {
  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
   
   Standard_EXPORT BRepExtrema_ExtFF()
   {
index 631d1ac..0d1608b 100644 (file)
@@ -9,6 +9,9 @@
 #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
@@ -38,19 +41,7 @@ class BRepExtrema_ExtPC
 {
  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
   
   Standard_EXPORT BRepExtrema_ExtPC()
   {
index 6e8ac30..944b4be 100644 (file)
@@ -25,6 +25,9 @@
 #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,7 @@ class BRepExtrema_ExtPF
 {
  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
 
   Standard_EXPORT BRepExtrema_ExtPF()
   {}
index 1bf1a19..8c8f035 100644 (file)
@@ -9,6 +9,9 @@
 #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
@@ -43,20 +46,8 @@ class BRepExtrema_SolutionElem
 {
  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
 
-  
   Standard_EXPORT BRepExtrema_SolutionElem()
   : myDist(0.), myPoint(0.,0.,0.), mySupType(BRepExtrema_IsVertex), myPar1(0.), myPar2(0.)
   {
index 7fce279..2f4d6c0 100755 (executable)
@@ -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() ;
index ca70cd1..90d012e 100755 (executable)
@@ -64,6 +64,9 @@ class BRepSweep_SequenceNodeOfSequenceOfShapesOfNumLinearRegularSweep;
 #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
@@ -72,18 +75,8 @@ class BRepSweep_NumLinearRegularSweep  {
 
 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() ;
index 2395851..ce7e034 100755 (executable)
@@ -38,7 +38,7 @@ DBC_VArray::DBC_VArray(const Standard_Integer Size) : DBC_BaseArray(Size)
   if(Size > 0) {
 #endif  
 #ifdef CSFDB
-    myData = (DBC_VArrayTNode*)StandardCSFDB_Allocate(Size * sizeof(DBC_VArrayTNode));
+    myData = (DBC_VArrayTNode*)Standard::Allocate(Size * sizeof(DBC_VArrayTNode));
     DBC_VArrayTNode* ptrtmp = (DBC_VArrayTNode*)myData;
     for (int i = 0; i < Size; i++) {
       ptrtmp = new((Standard_Address)ptrtmp) DBC_VArrayTNode();
@@ -69,7 +69,7 @@ DBC_VArray::DBC_VArray(const DBC_VArray& Varray) : DBC_BaseArray(Varray)
 #ifdef CSFDB
   //myData = new DBC_VArrayTNode[mySize];
 
-  myData = (DBC_VArrayTNode*)StandardCSFDB_Allocate(mySize * sizeof(DBC_VArrayTNode));
+  myData = (DBC_VArrayTNode*)Standard::Allocate(mySize * sizeof(DBC_VArrayTNode));
   DBC_VArrayTNode* ptrtmp = (DBC_VArrayTNode*)myData;
 
   for(Standard_Integer i=0; i<mySize; i++) {
@@ -143,7 +143,7 @@ void DBC_VArray::Resize (const Standard_Integer NewSize)
 
     DBC_VArrayTNode* ptr = 0L;
     if(NewSize) {
-      ptr = (DBC_VArrayTNode*)StandardCSFDB_Allocate(NewSize * sizeof(DBC_VArrayTNode));
+      ptr = (DBC_VArrayTNode*)Standard::Allocate(NewSize * sizeof(DBC_VArrayTNode));
     }
 
     DBC_VArrayTNode* ptrtmp = ptr;
@@ -162,8 +162,7 @@ void DBC_VArray::Resize (const Standard_Integer NewSize)
        ptrtmp->DBC_VArrayTNode::~DBC_VArrayTNode();
        ptrtmp++;
       }
-//      StandardCSFDB_Free((Standard_Address&)myData,mySize * sizeof(DBC_VArrayTNode));
-      StandardCSFDB_Free((Standard_Address&)myData);
+      Standard::Free((Standard_Address&)myData);
     } else {
       for(i = 0; i < NewSize; i++) {
        ptrtmp = new((Standard_Address)ptrtmp) DBC_VArrayTNode();
@@ -278,8 +277,7 @@ void DBC_VArray::Destroy()
       ptrtmp->DBC_VArrayTNode::~DBC_VArrayTNode();
       ptrtmp++;
     }
-//    StandardCSFDB_Free((Standard_Address&)myData,mySize * sizeof(DBC_VArrayTNode));
-    StandardCSFDB_Free((Standard_Address&)myData);
+    Standard::Free((Standard_Address&)myData);
     myData = 0L;
   }
 #endif 
index 7c91460..90457c0 100755 (executable)
@@ -14,7 +14,7 @@ struct _degeneration
 {
   int   mode;
   float skipRatio;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 typedef _degeneration  DEGENERATION;
 typedef _degeneration* PDEGENERATION;
@@ -28,7 +28,7 @@ struct _ds_internal
   int                 model;
   float               skipRatio;
   unsigned char*      bDraw;
-  IMPLEMENT_MEMORY_OPERATORS  
+  DEFINE_STANDARD_ALLOC
 };
 typedef _ds_internal  DS_INTERNAL;
 typedef _ds_internal* PDS_INTERNAL;
index b61c09f..ba17f9e 100755 (executable)
@@ -14,45 +14,14 @@ for InterfaceGraphic_Parray.hxx definitions
 #define  INTERFACEGRAPHIC_TELEM_H
 
 #include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
 #include <InterfaceGraphic_tgl_all.hxx>
 #include <stdlib.h>
 
-//if SUN compiler
-#if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530) && ! defined(typename)
-#define IMPLEMENT_MEMORY_OPERATORS \
-  void* operator new (size_t size) {\
-  void* p = malloc( size );\
-  memset(p, 0, size);\
-  return p;\
-  }\
-  void operator delete(void* p) {\
-  free( p );\
-  }
-#else
-//if other
-#define IMPLEMENT_MEMORY_OPERATORS \
-  void* operator new (size_t size) {\
-  void* p = malloc( size );\
-  memset(p, 0, size);\
-  return p;\
-  }\
-  void* operator new[] (size_t size) {\
-  void* p = malloc( size );\
-  memset(p, 0, size);\
-  return p;\
-  }\
-  void operator delete(void* p) { \
-  free( p );\
-  }\
-  void operator delete[](void* p) {\
-  free( p );\
-  }
-#endif
-
 struct TEL_TEXTURE_COORD
 {
   float xy[2];
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 typedef TEL_TEXTURE_COORD* tel_texture_coord;
@@ -60,23 +29,7 @@ typedef TEL_TEXTURE_COORD* tel_texture_coord;
 struct TEL_POINT
 {
   float  xyz[3];
-  IMPLEMENT_MEMORY_OPERATORS
-    /*void* operator new (size_t size) {
-    void* p = malloc( size );
-    memset(p, 0, size);
-    return p;
-    }
-    void* operator new[] (size_t size) {
-    void* p = malloc( size );
-    memset(p, 0, size);
-    return p;
-    }
-    void operator delete(void* p) {
-    free( p );
-    }
-    void operator delete[](void* p) {
-    free( p );
-    }*/
+  DEFINE_STANDARD_ALLOC
 };
 typedef TEL_POINT* tel_point;
 
@@ -84,7 +37,7 @@ struct TEL_COLOUR
 {
   /* OCC8854: san -- number of color components increased to include alpha value */
   float    rgb[4];
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 typedef TEL_COLOUR* tel_colour;
 
@@ -92,7 +45,7 @@ struct TEL_POINT_DATA
 {
   int      num;
   TEL_POINT* data;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 typedef TEL_POINT_DATA* tel_point_data;
 
@@ -100,7 +53,7 @@ struct TEL_TINT_DATA
 {
   int   num;
   int*  data;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 typedef TEL_TINT_DATA* tel_tint_data;
 
@@ -108,7 +61,7 @@ struct TEL_MATRIX3_DATA
 {
   TComposeType  mode;
   Tmatrix3      mat;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 typedef TEL_MATRIX3_DATA* tel_matrix3_data;
 
@@ -116,7 +69,7 @@ struct TEL_ALIGN_DATA
 {
   Tint Hmode;
   Tint Vmode;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 typedef TEL_ALIGN_DATA* tel_align_data;
 
@@ -149,7 +102,7 @@ struct  TEL_SURF_PROP
   int       isamb, isdiff, isspec, isemsv;
   int       isphysic; 
   TEL_COLOUR speccol, difcol, ambcol, emscol, matcol;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 typedef TEL_SURF_PROP* tel_surf_prop;
 
@@ -304,7 +257,7 @@ struct  TEL_POFFSET_PARAM
   int   mode;
   float factor;
   float units;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 typedef TEL_POFFSET_PARAM* tel_poffset_param;
 /* OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets */
@@ -316,7 +269,7 @@ struct TEL_TRANSFORM_PERSISTENCE
   float     pointX;
   float     pointY;
   float     pointZ;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 typedef TEL_TRANSFORM_PERSISTENCE* tel_transform_persistence;
 /* ABD 29/10/04  Transform Persistence of Presentation( pan, zoom, rotate ) */
index 8e8bc01..2f76893 100755 (executable)
@@ -7,11 +7,6 @@
 #include <LDOM_BasicAttribute.hxx>
 #include <LDOM_MemManager.hxx>
 
-#ifdef WNT
-// Disable the warning: "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 //=======================================================================
 //function : LDOM_BasicAttribute
 //purpose  : 
index f73efcb..49661cd 100755 (executable)
@@ -15,20 +15,12 @@ class LDOM_Element;
 class LDOM_Attr;
 class LDOM_Node;
 
-#ifdef WNT
-// Disable the warning: "operator new unmatched by delete"
-#pragma warning (push)
-#pragma warning (disable:4291)
-#endif
-
 //  Class LDOM_BasicAttribute
 //
 
 class LDOM_BasicAttribute : public LDOM_BasicNode
 {
  public:
-  void * operator new (size_t, void * anAddress) { return anAddress; }
   // ---------- PUBLIC METHODS ----------
 
   LDOM_BasicAttribute () : LDOM_BasicNode (LDOM_Node::UNKNOWN) {}
@@ -72,8 +64,4 @@ class LDOM_BasicAttribute : public LDOM_BasicNode
   LDOMBasicString       myValue;
 };
 
-#ifdef WNT
-#pragma warning (pop)
-#endif
-
 #endif
index 8bc28f3..dd943bd 100755 (executable)
@@ -9,11 +9,6 @@
 #include <LDOM_BasicText.hxx>
 #include <LDOM_MemManager.hxx>
 
-#ifdef WNT
-// Disable the warning: "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 //=======================================================================
 //function : Create
 //purpose  : construction in the Document's data pool
index 2032ce9..f4d9d33 100755 (executable)
@@ -17,19 +17,12 @@ class LDOM_NodeList;
 class LDOM_Element;
 class LDOM_BasicAttribute;
 
-#ifdef WNT
-// Disable the warning: "operator new unmatched by delete"
-#pragma warning (push)
-#pragma warning (disable:4291)
-#endif
-
 //  Class LDOM_BasicElement
 //
 
 class LDOM_BasicElement : public LDOM_BasicNode
 {
  public:
-  void * operator new (size_t, void * anAddress) { return anAddress; }
  
   // ---------- PUBLIC METHODS ----------
 
@@ -128,8 +121,4 @@ class LDOM_BasicElement : public LDOM_BasicNode
   LDOM_BasicNode        * myFirstChild;
 };
 
-#ifdef WNT
-#pragma warning (pop)
-#endif
-
 #endif
index f5ef3df..a255244 100755 (executable)
@@ -19,6 +19,9 @@ class LDOMParser;
 class LDOM_BasicNode 
 {
  public:
+  DEFINE_STANDARD_ALLOC
+
+ public:
 
   Standard_Boolean  isNull    () const {return myNodeType ==LDOM_Node::UNKNOWN;}
 
index e045a0d..c92f527 100755 (executable)
@@ -8,11 +8,6 @@
 #include <LDOM_BasicText.hxx>
 #include <LDOM_MemManager.hxx>
 
-#ifdef WNT
-// Disable the warning: "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 //=======================================================================
 //function : LDOM_BasicText()
 //purpose  : Constructor
index 8415310..6c4cce0 100755 (executable)
@@ -15,19 +15,12 @@ class LDOM_CharacterData;
 class LDOMParser;
 class LDOM_BasicElement;
 
-#ifdef WNT
-// Disable the warning: "operator new unmatched by delete"
-#pragma warning (push)
-#pragma warning (disable:4291)
-#endif
-
 //  Class LDOM_BasicText
 //
 
 class LDOM_BasicText : public LDOM_BasicNode
 {
  public:
-  void * operator new (size_t, void * anAddress) { return anAddress; }
 
   // ---------- PUBLIC METHODS ----------
 
@@ -69,8 +62,4 @@ class LDOM_BasicText : public LDOM_BasicNode
   LDOMBasicString       myValue;
 };
 
-#ifdef WNT
-#pragma warning (pop)
-#endif
-
 #endif
index 0fb54fe..ab4bc9b 100755 (executable)
@@ -79,6 +79,6 @@ NCollection_Comparator.hxx
 NCollection_QuickSort.hxx
 
 NCollection_Haft.h
+NCollection_DefaultHasher.hxx
+NCollection_DefineAlloc.hxx
 
-
-NCollection_DefaultHasher.hxx
\ No newline at end of file
index 6e3d1db..98cf5e3 100755 (executable)
 
 #include <NCollection_BaseCollection.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (push)
-#pragma warning (disable:4291)
-#endif
-
 // *********************************************** Template for Array1 class
 
 /**
@@ -86,10 +80,6 @@ template <class TheItemType> class NCollection_Array1
     //! Variable value access
     virtual TheItemType& ChangeValue (void) const 
     { return myArray->ChangeValue(myCurrent); }
-    //! Operator new for allocating iterators
-    void* operator new(size_t theSize,
-                       const Handle(NCollection_BaseAllocator)& theAllocator) 
-    { return theAllocator->Allocate(theSize); }
   private:
     Standard_Integer    myCurrent; //!< Index of the current item
     NCollection_Array1* myArray;   //!< Pointer to the array being iterated
@@ -277,8 +267,4 @@ template <class TheItemType> class NCollection_Array1
   TheItemType*         myData;      //!< Pointer to '0'th array item
 };
 
-#ifdef WNT
-#pragma warning (pop)
-#endif
-
 #endif
index 0540209..bd7cbd6 100755 (executable)
 
 #include <NCollection_BaseCollection.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 // *********************************************** Template for Array2 class
 /**
 * Purpose:   The class Array2 represents bi-dimensional arrays 
@@ -70,10 +65,6 @@ template <class TheItemType> class NCollection_Array2
     //! Variable value access
     virtual TheItemType& ChangeValue (void) const
     { return myArray->myStart[myCurrent]; }
-    //! Operator new for allocating iterators
-    void* operator new(size_t theSize,
-                       const Handle(NCollection_BaseAllocator)& theAllocator) 
-    { return theAllocator->Allocate(theSize); }
   private:
     Standard_Integer    myCurrent;  //!< Index of the current item
     Standard_Integer    mySize;     //!< Total amount of items
@@ -316,8 +307,4 @@ template <class TheItemType> class NCollection_Array2
 
 };
 
-#ifdef WNT
-#pragma warning (default:4291)
-#endif
-
 #endif
index 70a16c0..504a267 100755 (executable)
@@ -7,6 +7,7 @@
 #define NCollection_BaseCollection_HeaderFile
 
 #include <NCollection_IncAllocator.hxx>
+#include <NCollection_DefineAlloc.hxx>
 
 /**
 * Purpose:     NCollection_BaseCollection  is the base  abstract  class for 
@@ -45,6 +46,9 @@ template<class TheItemType> class NCollection_BaseCollection
     virtual const TheItemType& Value(void) const=0;
     //! Value change access
     virtual TheItemType& ChangeValue(void) const=0;
+  public:
+    DEFINE_STANDARD_ALLOC
+    DEFINE_NCOLLECTION_ALLOC
   protected:
     //! Empty constructor
     Iterator (void) {}
index 0349cf1..3bd0a44 100755 (executable)
 #include <Standard_NoSuchObject.hxx>
 #include <NCollection_ListNode.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 typedef void (* NCollection_DelListNode) 
      (NCollection_ListNode*, Handle(NCollection_BaseAllocator)& theAl);
 
index 6e5c423..42d9aca 100755 (executable)
 #include <NCollection_BaseAllocator.hxx>
 #include <NCollection_ListNode.hxx>
 
-//#ifdef WNT
-//// Disable the warning "operator new unmatched by delete"
-//#pragma warning (disable:4291)
-//#endif
-
 typedef void (* NCollection_DelMapNode) 
      (NCollection_ListNode*, Handle(NCollection_BaseAllocator)& theAl);
 
index 8dee445..c5273f8 100755 (executable)
 #include <NCollection_Map.hxx>
 #include <NCollection_DataMap.hxx>
 #include <NCollection_BaseAllocator.hxx>
-
-// work-around for obsolete SUN WorkShop 5.3 compiler 
-// which does not recognize typename keyword
-#if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530) && ! defined(typename)
-#define typename
-#endif
+#include <NCollection_TypeDef.hxx>
 
 //! Auxiliary enumeration serving as responce from method Inspect
 enum NCollection_CellFilter_Action 
@@ -109,8 +104,8 @@ template <class Inspector>
 class NCollection_CellFilter
 {  
 public:
-  typedef typename Inspector::Target Target;
-  typedef typename Inspector::Point  Point;
+  typedef TYPENAME Inspector::Target Target;
+  typedef TYPENAME Inspector::Point  Point;
 
 public:
 
index 97a051b..2163c6c 100755 (executable)
 #include <Standard_TypeMismatch.hxx>
 #include <Standard_NoSuchObject.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (push)
-#pragma warning (disable:4291)
-#endif
-
 /**
 * Purpose:     The DataMap is a Map to store keys with associated
 *              Items. See Map  from NCollection for  a discussion
@@ -119,10 +113,6 @@ template < class TheKeyType,
 #endif
       return ((DataMapNode *) myNode)->Key();
     }
-    //! Operator new for allocating iterators
-    void* operator new(size_t theSize,
-                       const Handle(NCollection_BaseAllocator)& theAllocator) 
-    { return theAllocator->Allocate(theSize); }
   };
 
  public:
@@ -342,9 +332,5 @@ template < class TheKeyType,
 
 };
 
-#ifdef WNT
-#pragma warning (pop)
-#endif
-
 #endif
 
diff --git a/src/NCollection/NCollection_DefineAlloc.hxx b/src/NCollection/NCollection_DefineAlloc.hxx
new file mode 100644 (file)
index 0000000..22488c8
--- /dev/null
@@ -0,0 +1,33 @@
+// File:        Standard_DefineAlloc.hxx
+// Created:     Jan 19 14:15:16 2012
+// Author:      Dmitry BOBYLEV 
+// Copyright:   Open CASCADE SAS 2012
+
+#ifndef _NCollection_DefineAlloc_HeaderFile
+# define _NCollection_DefineAlloc_HeaderFile
+
+// Macro to overload placement new and delete operators for NCollection allocators.
+// For Borland C and old SUN compilers do not define placement delete
+// as it is not supported.
+# if defined(__BORLANDC__) || (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530))
+#  define DEFINE_NCOLLECTION_ALLOC                                               \
+   void* operator new (size_t theSize,                                           \
+                       const Handle(NCollection_BaseAllocator)& theAllocator)    \
+   {                                                                             \
+     return theAllocator->Allocate(theSize);                                     \
+   }
+# else
+#  define DEFINE_NCOLLECTION_ALLOC                                               \
+   void* operator new (size_t theSize,                                           \
+                       const Handle(NCollection_BaseAllocator)& theAllocator)    \
+   {                                                                             \
+     return theAllocator->Allocate(theSize);                                     \
+   }                                                                             \
+   void  operator delete (void* theAddress,                                      \
+                          const Handle(NCollection_BaseAllocator)& theAllocator) \
+   {                                                                             \
+     theAllocator->Free(theAddress);                                             \
+   }
+# endif
+
+#endif
\ No newline at end of file
index e05110e..29136a1 100755 (executable)
 #include <NCollection_DefineBaseCollection.hxx>
 #include <NCollection_Array1.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 // *********************************************** Template for Array1 class
 
 #define DEFINE_ARRAY1(_ClassName_, _BaseCollection_, TheItemType)              \
index 34a3f68..2d31169 100755 (executable)
 #include <NCollection_DefineBaseCollection.hxx>
 #include <NCollection_Array2.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 // *********************************************** Template for Array2 class
 
 #define DEFINE_ARRAY2(_ClassName_, _BaseCollection_, TheItemType)              \
index 09a9ff2..9882cf4 100755 (executable)
 #include <NCollection_DefineBaseCollection.hxx>
 #include <NCollection_DataMap.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 // *********************************************** Class DataMap *************
 
 #define DEFINE_DATAMAP(_ClassName_, _BaseCollection_, TheKeyType, TheItemType) \
index a694939..8ae067b 100755 (executable)
 #include <NCollection_DefineBaseCollection.hxx>
 #include <NCollection_DoubleMap.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 // *********************************************** Class DoubleMap ************
 
 #define DEFINE_DOUBLEMAP(_ClassName_, _BaseCollection_, TheKey1Type, TheKey2Type) \
index aa8a604..ae3a8b0 100755 (executable)
 #include <NCollection_DefineBaseCollection.hxx>
 #include <NCollection_IndexedDataMap.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 // *********************************************** Class IndexedDataMap ******
 
 #define DEFINE_INDEXEDDATAMAP(_ClassName_, _BaseCollection_, TheKeyType, TheItemType) \
index bfeb3b0..e13a77d 100755 (executable)
 #include <NCollection_DefineBaseCollection.hxx>
 #include <NCollection_IndexedMap.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 // *********************************************** Class IndexedMap ***********
 
 #define DEFINE_INDEXEDMAP(_ClassName_, _BaseCollection_, TheKeyType)           \
index e01254c..c2017c6 100755 (executable)
 
 #include <NCollection_List.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 // **************************************** Template for  List   class ********
 
 #define DEFINE_LIST(_ClassName_, _BaseCollection_, TheItemType)                \
index e229243..98fceb9 100755 (executable)
 #include <NCollection_DefineBaseCollection.hxx>
 #include <NCollection_Map.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 // *********************************************** Class Map *****************
 
 #define DEFINE_MAP(_ClassName_, _BaseCollection_, TheKeyType)                  \
index 5ddd0a0..c04adf5 100755 (executable)
 
 #include <NCollection_Queue.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 // **************************************** Template for  Queue  class ********
 
 #define DEFINE_QUEUE(_ClassName_, _BaseCollection_, TheItemType)               \
index 7686a72..1e4ecbd 100755 (executable)
 #include <NCollection_DefineBaseCollection.hxx>
 #include <NCollection_SList.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 // **************************************** Template for  SList  class ********
 
 #define DEFINE_SLIST(_ClassName_, _BaseCollection_, TheItemType)               \
index d83c391..ca44be1 100755 (executable)
 #include <NCollection_DefineBaseCollection.hxx>
 #include <NCollection_Sequence.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 // **************************************** Template for Sequence class ********
 
 #define DEFINE_SEQUENCE(_ClassName_, _BaseCollection_, TheItemType)            \
index def7443..9bac2ac 100755 (executable)
 #include <NCollection_DefineBaseCollection.hxx>
 #include <NCollection_Set.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 // **************************************** Template for   Set   class ********
 
 #define DEFINE_SET(_ClassName_, _BaseCollection_, TheItemType)                 \
index 8c5c677..d7cef0b 100755 (executable)
 #include <NCollection_DefineBaseCollection.hxx>
 #include <NCollection_Stack.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 // **************************************** Template for  Stack  class ********
 
 #define DEFINE_STACK(_ClassName_, _BaseCollection_, TheItemType)               \
index 92b2441..147ff58 100755 (executable)
 #include <NCollection_DefineBaseCollection.hxx>
 #include <NCollection_TListIterator.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 // ********************************** Implementation of the Iterator interface
 #define DEFINE_TLISTITERATOR(_ClassName_, _BaseCollection_, TheItemType)       \
         typedef NCollection_TListIterator<TheItemType > _ClassName_;
index 0ee8721..73a2b51 100755 (executable)
 
 #include <NCollection_TListNode.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 // ******************************* Class defining list node - for internal use
 #define DEFINE_TLISTNODE(_ClassName_, _BaseCollection_, TheItemType)           \
         typedef NCollection_TListNode<TheItemType > _ClassName_;
index 4a65363..829190e 100755 (executable)
 #include <NCollection_DefineBaseCollection.hxx>
 #include <NCollection_Vector.hxx>
 
-#ifdef WNT
-// Disable the warning: "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 //  Class NCollection_Vector (dynamic array of objects)
 //
 // This class is similar to NCollection_Array1  though the indices always start
index 4b85c6f..4266e78 100755 (executable)
 
 #include <NCollection_DefaultHasher.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (push)
-#pragma warning (disable:4291)
-#endif
-
 /**
 * Purpose:     The DoubleMap  is used to  bind  pairs (Key1,Key2)
 *              and retrieve them in linear time.
@@ -128,10 +122,6 @@ template < class TheKey1Type,
       Standard_ImmutableObject::Raise("NCollection_DoubleMap::Iterator::ChangeValue");
       return * (TheKey2Type *) NULL; // For compiler
     }
-    //! Operator new for allocating iterators
-    void* operator new(size_t theSize,
-                       const Handle(NCollection_BaseAllocator)& theAllocator) 
-    { return theAllocator->Allocate(theSize); }
   };
 
  public:
@@ -476,8 +466,4 @@ template < class TheKey1Type,
 
 };
 
-#ifdef WNT
-#pragma warning (pop)
-#endif
-
 #endif
index 0eb09ed..8068fb7 100755 (executable)
 #include <Standard_OutOfRange.hxx>
 #endif
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (push)
-#pragma warning (disable:4291)
-#endif
-
 /**
  * Purpose:     An indexed map is used  to store keys and to  bind
  *              an index to them.  Each  new key stored in the map
@@ -127,10 +121,6 @@ template < class TheKeyType,
 #endif
       return myMap->ChangeFromIndex(myIndex);
     }
-    //! Operator new for allocating iterators
-    void* operator new(size_t theSize,
-                       const Handle(NCollection_BaseAllocator)& theAllocator) 
-    { return theAllocator->Allocate(theSize); }
     
   private:
     NCollection_IndexedDataMap * myMap;   //!< Pointer to the map being iterated
@@ -505,8 +495,4 @@ template < class TheKeyType,
 
 };
 
-#ifdef WNT
-#pragma warning (pop)
-#endif
-
 #endif
index 1a53813..79fd5c9 100755 (executable)
 #include <Standard_OutOfRange.hxx>
 #endif
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (push)
-#pragma warning (disable:4291)
-#endif
-
 /**
  * Purpose:     An indexed map is used to  store  keys and to bind
  *              an index to them.  Each new key stored in  the map
@@ -115,11 +109,6 @@ template < class TheKeyType,
       return * (TheKeyType *) NULL; // This for compiler
     }
     
-    //! Operator new for allocating iterators
-    void* operator new(size_t theSize,
-                       const Handle(NCollection_BaseAllocator)& theAllocator) 
-    { return theAllocator->Allocate(theSize); }
-    
   private:
     NCollection_IndexedMap * myMap;   // Pointer to the map being iterated
     Standard_Integer         myIndex; // Current index
@@ -417,8 +406,4 @@ template < class TheKeyType,
 
 };
 
-#ifdef WNT
-#pragma warning (pop)
-#endif
-
 #endif
index 1a02ed6..c6b38d8 100755 (executable)
 #include <Standard_NoSuchObject.hxx>
 #endif
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (push)
-#pragma warning (disable:4291)
-#endif
-
 /**
  * Purpose:      Simple list to link  items together keeping the first 
  *               and the last one.
@@ -291,8 +285,4 @@ template <class TheItemType> class NCollection_List
   }
 };
 
-#ifdef WNT
-#pragma warning (pop)
-#endif
-
 #endif
index fd57bec..d27d93a 100755 (executable)
@@ -8,11 +8,6 @@
 
 #include <NCollection_BaseAllocator.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 /**
  * Purpose:     This class is used to  represent a node  in the BaseList and
  *              BaseMap. 
index a7a3a07..91388e7 100755 (executable)
 #include <Standard_NoSuchObject.hxx>
 #endif
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (push)
-#pragma warning (disable:4291)
-#endif
-
 /**
  * Purpose:     Single hashed Map. This  Map is used  to store and
  *              retrieve keys in linear time.
@@ -116,10 +110,6 @@ template < class TheKeyType,
 #endif
       return ((MapNode *) myNode)->Value();
     }
-    //! Operator new for allocating iterators
-    void* operator new(size_t theSize,
-                       const Handle(NCollection_BaseAllocator)& theAllocator)
-    { return theAllocator->Allocate(theSize); }
   };
 
  public:
@@ -318,8 +308,4 @@ template < class TheKeyType,
 
 };
 
-#ifdef WNT
-#pragma warning (pop)
-#endif
-
 #endif
index 2e009c6..c50ae78 100755 (executable)
 #include <Standard_NoSuchObject.hxx>
 #endif
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 /**
  * Purpose:      A queue is  a structure where Items are  added  at
  *               the end  and removed from   the  front. The  first
@@ -135,8 +130,4 @@ template <class TheItemType> class NCollection_Queue
 
 };
 
-#ifdef WNT
-#pragma warning (default:4291)
-#endif
-
 #endif
index 1954c0e..25b1194 100755 (executable)
 #include <Standard_NoSuchObject.hxx>
 #endif
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 /**
  * Purpose:     An SList is a LISP like list of Items.
  *              An SList is :
@@ -76,15 +71,10 @@ template <class TheItemType> class NCollection_SList
       myTail->Clear();
       myTail->myAllocator->Free(myTail);
     }
-    //! Operator new for allocating nodes
-    void* operator new(size_t theSize,
-                       const Handle(NCollection_BaseAllocator)& theAllocator) 
-    { return theAllocator->Allocate(theSize); }
-    //! news to avoid warnings on hiding  - not for use
-    void* operator new(size_t theSize) 
-    { return Standard::Allocate(theSize); }
-    void* operator new(size_t /*theSize*/, void* theAddress) 
-    { return theAddress; }
+
+    DEFINE_STANDARD_ALLOC
+    DEFINE_NCOLLECTION_ALLOC
+
   private:
     // ---------- PRIVATE FIELDS ------------
     Standard_Integer    myCount; //!< Reference count
@@ -118,11 +108,6 @@ template <class TheItemType> class NCollection_SList
       myNode->myCount++;
   }
 
-  //! Operator new for creating 'iterator'
-  void* operator new(size_t theSize,
-                     const Handle(NCollection_BaseAllocator)& theAllocator) 
-  { return theAllocator->Allocate(theSize); }
-
   //! Clear the items out
   void Clear (void)
   {
@@ -287,8 +272,4 @@ template <class TheItemType> class NCollection_SList
   friend class SListNode;
 };
 
-#ifdef WNT
-#pragma warning (default:4291)
-#endif
-
 #endif
index a26a58a..3693ad2 100755 (executable)
 #include <Standard_NoSuchObject.hxx>
 #endif
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (push)
-#pragma warning (disable:4291)
-#endif
-
 /**
  * Purpose:     Definition of a sequence of elements indexed by
  *              an Integer in range of 1..n
@@ -43,9 +37,8 @@ template <class TheItemType> class NCollection_Sequence
     //! Variable value access
     TheItemType&       ChangeValue () { return myValue; }
     //! Memory allocation
-    void* operator new(size_t theSize,
-                       const Handle(NCollection_BaseAllocator)& theAllocator) 
-    { return theAllocator->Allocate(theSize); }
+    DEFINE_STANDARD_ALLOC
+    DEFINE_NCOLLECTION_ALLOC
 
   private:
     TheItemType    myValue;
@@ -82,10 +75,6 @@ template <class TheItemType> class NCollection_Sequence
     //! Variable value access
     virtual TheItemType& ChangeValue (void) const
     { return ((Node *)myCurrent)->ChangeValue(); }
-    //! Operator new for allocating iterators
-    void* operator new(size_t theSize,
-                       const Handle(NCollection_BaseAllocator)& theAllocator) 
-    { return theAllocator->Allocate(theSize); }
   }; // End of nested class Iterator
 
  public:
@@ -315,8 +304,4 @@ template <class TheItemType> class NCollection_Sequence
 
 };
 
-#ifdef WNT
-#pragma warning (pop)
-#endif
-
 #endif
index 100434f..3ff5574 100755 (executable)
 #include <NCollection_TListNode.hxx>
 #include <NCollection_TListIterator.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 /**
  * Purpose:      A set is an  unordered  collection  of items without
  *               duplications. To test for duplications the operators == and !=
@@ -220,8 +215,4 @@ template <class TheItemType> class NCollection_Set
 
 };
 
-#ifdef WNT
-#pragma warning (default:4291)
-#endif
-
 #endif
index 456481b..35640f0 100755 (executable)
@@ -8,12 +8,6 @@
 
 #include <NCollection_SparseArrayBase.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (push)
-#pragma warning (disable:4291)
-#endif
-
 /**
 * Dynamically resizable sparse array of objects
 *
@@ -266,9 +260,5 @@ private:
 
 };
 
-#ifdef WNT
-#pragma warning (pop)
-#endif
-
 #endif
 
index 06e616d..a18fce2 100755 (executable)
 #include <Standard_NoSuchObject.hxx>
 #endif
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (disable:4291)
-#endif
-
 /**
  * Purpose:      A stack is a structure where item can be added and
  *               removed from the top. Like a stack of plates  in a
@@ -135,8 +130,4 @@ template <class TheItemType> class NCollection_Stack
 
 };
 
-#ifdef WNT
-#pragma warning (default:4291)
-#endif
-
 #endif
index e5b0964..6e8de89 100755 (executable)
 #include <NCollection_BaseList.hxx>
 #include <NCollection_TListNode.hxx>
 
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (push)
-#pragma warning (disable:4291)
-#endif
-
 /**
  * Purpose:     This Iterator class iterates on BaseList of TListNode and is 
  *              instantiated in List/Set/Queue/Stack
@@ -54,14 +48,6 @@ template <class TheItemType> class NCollection_TListIterator
   //! Variable Value access
   virtual TheItemType& ChangeValue (void) const
   { return ((NCollection_TListNode<TheItemType> *)myCurrent)->ChangeValue(); }
-  //! Operator new for allocating iterators
-  void* operator new(size_t theSize,
-                     const Handle(NCollection_BaseAllocator)& theAllocator) 
-  { return theAllocator->Allocate(theSize); }
 };
 
-#ifdef WNT
-#pragma warning (pop)
-#endif
-
 #endif
index ddaa93b..05bfeb2 100755 (executable)
@@ -8,12 +8,7 @@
 
 #include <NCollection_ListNode.hxx>
 #include <NCollection_BaseAllocator.hxx>
-
-#ifdef WNT
-// Disable the warning "operator new unmatched by delete"
-#pragma warning (push)
-#pragma warning (disable:4291)
-#endif
+#include <NCollection_DefineAlloc.hxx>
 
 /**
  * Purpose:     Abstract list node class. Used by BaseList
@@ -32,9 +27,8 @@ template <class TheItemType> class NCollection_TListNode
   //! Variable value access
   TheItemType& ChangeValue () { return myValue; }
   //! Memory allocation
-  void* operator new(size_t theSize,
-                     const Handle(NCollection_BaseAllocator)& theAllocator) 
-  { return theAllocator->Allocate(theSize); }
+  DEFINE_STANDARD_ALLOC
+  DEFINE_NCOLLECTION_ALLOC
   //! Static deleter to be passed to BaseList
   static void delNode (NCollection_ListNode * theNode, 
                        Handle(NCollection_BaseAllocator)& theAl)
@@ -49,8 +43,4 @@ template <class TheItemType> class NCollection_TListNode
   
 };
 
-#ifdef WNT
-#pragma warning (pop)
-#endif
-
 #endif
index f4e7545..e959121 100755 (executable)
@@ -7,12 +7,7 @@
 #define NCollection_UBTree_HeaderFile
 
 #include <NCollection_BaseAllocator.hxx>
-
-#ifdef WNT
-// Disable the warning: "operator new unmatched by delete"
-#pragma warning (push)
-#pragma warning (disable:4291)
-#endif
+#include <NCollection_DefineAlloc.hxx>
 
 /**
  * The algorithm of unbalanced binary tree of overlapped bounding boxes.
@@ -117,6 +112,10 @@ template <class TheObjType, class TheBndType> class NCollection_UBTree
   class TreeNode
   {
   public:
+    DEFINE_STANDARD_ALLOC
+    DEFINE_NCOLLECTION_ALLOC
+
+  public:
     TreeNode (const TheObjType& theObj, const TheBndType& theBnd)
       : myBnd(theBnd), myObject(theObj), myChildren(0), myParent(0) {}
 
@@ -196,20 +195,6 @@ template <class TheObjType, class TheBndType> class NCollection_UBTree
     ~TreeNode () { myChildren = 0L; }
 
     /**
-     * Allocator of a tree node.
-     */
-    void * operator new (size_t theSize,
-                         const Handle(NCollection_BaseAllocator)& theAllocator) 
-    { return theAllocator->Allocate(theSize); }
-
-    /**
-     * Allocator of a tree node.
-     */
-    void * operator new (size_t,
-                         void * theMem) 
-    { return theMem; }
-
-    /**
      * Deleter of tree node. The whole hierarchy of its children also deleted.
      * This method should be used instead of operator delete.
      */ 
@@ -500,8 +485,4 @@ DEFINE_STANDARD_HANDLE (_HUBTREE, _HPARENT)
 IMPLEMENT_STANDARD_HANDLE (_HUBTREE, _HPARENT)                          \
 IMPLEMENT_STANDARD_RTTIEXT(_HUBTREE, _HPARENT)
 
-#ifdef WNT
-#pragma warning (pop)
-#endif
-
 #endif
index d18f669..8cbbda4 100755 (executable)
 #include <Standard_OutOfRange.hxx>
 #endif
 
-#ifdef WNT
-// Disable the warning: "operator new unmatched by delete"
-#pragma warning (push)
-#pragma warning (disable:4291)
-#endif
-
 /**
 * Class NCollection_Vector (dynamic array of objects)
 *
@@ -54,8 +48,9 @@ template <class TheItemType> class NCollection_Vector
   //! Nested class MemBlock
   class MemBlock : public NCollection_BaseVector::MemBlock
   {
-  public:
-    void * operator new (size_t, void * theAddress) { return theAddress; }
+   public:
+    DEFINE_STANDARD_ALLOC
+
     //! Empty constructor
     MemBlock (NCollection_BaseAllocator* theAlloc)
       : NCollection_BaseVector::MemBlock(0,0,theAlloc)
@@ -156,10 +151,6 @@ template <class TheItemType> class NCollection_Vector
     //! Variable value access
     virtual TheItemType& ChangeValue (void) const       {
       return ((MemBlock *) CurBlockV()) -> ChangeValue(myCurIndex); }
-    //! Operator new for allocating iterators
-    void* operator new(size_t theSize,
-                       const Handle(NCollection_BaseAllocator)& theAllocator) 
-    { return theAllocator->Allocate(theSize); }
   }; // End of the nested class Iterator
 
   // ----------------------------------------------------------------------
@@ -306,8 +297,4 @@ template <class TheItemType> class NCollection_Vector
   friend class Iterator;
 };
 
-#ifdef WNT
-#pragma warning (pop)
-#endif
-
 #endif
index 81d8f18..9f6e2af 100755 (executable)
@@ -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
 
index 02bc9b2..c8be420 100755 (executable)
 #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
index 3dae10a..736b32b 100644 (file)
@@ -24,7 +24,7 @@ struct OPENGL_SURF_PROP
   int          isphysic;
   unsigned int color_mask;
   TEL_COLOUR speccol, difcol, ambcol, emscol, matcol;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 struct TEL_CONTEXT_FACE
@@ -39,7 +39,7 @@ struct TEL_CONTEXT_FACE
   int                  doTextureMap;
   int                  TexId;
   TEL_POFFSET_PARAM PolygonOffset;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #include <OpenGl_Element.hxx>
@@ -67,7 +67,7 @@ class OpenGl_AspectFace : public OpenGl_Element
   OpenGl_AspectLine  myAspectEdge;
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //_OpenGl_AspectFace_Header
index 2e820ec..7eac3ea 100644 (file)
@@ -34,7 +34,7 @@ class OpenGl_AspectLine : public OpenGl_Element
   float             myWidth;
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //_OpenGl_AspectLine_Header
index 5613667..29cb534 100644 (file)
@@ -33,7 +33,7 @@ class OpenGl_AspectMarker : public OpenGl_Element
   float               myScale;
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //OpenGl_AspectMarker_Header
index 516d278..a3e4d8a 100644 (file)
@@ -49,7 +49,7 @@ class OpenGl_AspectText : public OpenGl_Element
   TEL_COLOUR               mySubtitleColor;
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //OpenGl_AspectText_Header
index 04c29a0..a417d28 100644 (file)
@@ -15,7 +15,7 @@ struct OpenGl_CView
 {
   Handle_OpenGl_Workspace WS;
   Handle_OpenGl_View      View;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //OpenGl_CView_Header
index 8186283..131ea91 100644 (file)
@@ -40,7 +40,7 @@ struct OPENGL_MARKER_DATA
   unsigned int Width;
   unsigned int Height;
   unsigned char* Array;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 typedef NCollection_DataMap<int,OPENGL_MARKER_DATA> OpenGl_MapOfUserMarker;
@@ -150,7 +150,7 @@ class OpenGl_Display : public MMgt_TShared
   Standard_Integer myFontSize;
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 extern Handle(OpenGl_Display) openglDisplay;
index e10510e..763d262 100644 (file)
@@ -17,7 +17,7 @@ class OpenGl_Element
   virtual void Render (const Handle(OpenGl_Workspace) &AWorkspace) const = 0;
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //OpenGl_Element_Header
index 00dfbce..b44ae1d 100644 (file)
@@ -58,7 +58,7 @@ class OpenGl_GraduatedTrihedron : public MMgt_TShared
   void* myPtrVisual3dView;
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //_OpenGl_GraduatedTrihedron_Header
index 65b4483..5e0187d 100644 (file)
@@ -22,7 +22,7 @@ struct OpenGl_ElementNode
   TelType type;
   OpenGl_Element *elem;
   OpenGl_ElementNode *next;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 class OpenGl_Group : public OpenGl_Element
@@ -53,7 +53,7 @@ class OpenGl_Group : public OpenGl_Element
   OpenGl_ElementNode *myFirst, *myLast;
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //_OpenGl_Group_Header
index b4bec03..f264955 100644 (file)
@@ -22,7 +22,7 @@ struct OpenGl_Light
   Tfloat      shine;
   Tfloat      atten[2];
   Tfloat      angle;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 typedef NCollection_List<OpenGl_Light> OpenGl_ListOfLight;
index 036028e..242cb62 100644 (file)
@@ -24,7 +24,7 @@ class OpenGl_Marker : public OpenGl_Element
   TEL_POINT myPoint;
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //OpenGl_Marker_Header
index c7425dc..8d03ba9 100644 (file)
@@ -27,7 +27,7 @@ class OpenGl_MarkerSet : public OpenGl_Element
   TEL_POINT *myPoints;
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //OpenGl_MarkerSet_Header
index 48caf79..524f2fb 100644 (file)
@@ -11,7 +11,7 @@
 struct OpenGl_Matrix
 {
   float mat[4][4];
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 Standard_EXPORT void OpenGl_Multiplymat3 (OpenGl_Matrix *c, const OpenGl_Matrix *a, const OpenGl_Matrix *b);
index 69157e2..061deba 100644 (file)
@@ -33,7 +33,7 @@ struct TEL_INDEXPOLY_DATA
   tel_colour vcolours;       /* Vertex colour values */
   tel_point  vnormals;       /* Vertex normals */
   tel_texture_coord vtexturecoord; /* Texture Coordinates */
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 class OpenGl_Mesh : public OpenGl_Element
@@ -72,7 +72,7 @@ class OpenGl_Mesh : public OpenGl_Element
   DS_INTERNAL *myDS;
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //OpenGl_Mesh_Header
index 2fce788..cfbaca3 100644 (file)
@@ -27,7 +27,7 @@ struct EXTRA_VERTEX
 {
   GLfloat vert[3];
   int ind;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 typedef EXTRA_VERTEX* extra_vertex;
 
@@ -36,7 +36,7 @@ struct SEQ_
   Tint ts_num, ts_alloc;
   void **tmesh_sequence;
   GLenum triangle_type; /* FSXXX OPTI */
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 struct OPENGL_DISPLAY_PGN
@@ -44,7 +44,7 @@ struct OPENGL_DISPLAY_PGN
   Tint num_of_seq;
   Tint num_alloc;
   SEQ_ *seq;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 static void bgntriangulate( const TEL_POLYGON_DATA *, void (APIENTRY*)() );
index c5089a7..7ece703 100644 (file)
@@ -30,7 +30,7 @@ struct TEL_POLYGON_DATA
   tel_point  vnormals;    /* Vertex normals */
   tel_texture_coord vtexturecoord; /* Texture Coordinates */
   OPENGL_DISPLAY_PGN *dsply;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 class OpenGl_Polygon : public OpenGl_Element
@@ -56,7 +56,7 @@ class OpenGl_Polygon : public OpenGl_Element
   TEL_POLYGON_DATA myData;
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //OpenGl_Polygon_Header
index 72b5f3f..677c20f 100644 (file)
@@ -32,7 +32,7 @@ class OpenGl_Polyline : public OpenGl_Element
   tel_colour myColors;        // Vertex color values for each vertex
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //OpenGl_Polyline_Header
index 2fb036f..25dcefd 100644 (file)
@@ -79,7 +79,7 @@ protected:
 
 public:
 
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 
 };
 
index 2928ea3..a6e88e0 100644 (file)
@@ -49,7 +49,7 @@ class OpenGl_PriorityList
   Standard_Integer        myNbStructures;
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //_OpenGl_PriorityList_Header
index 9c7d5b8..0dd058e 100644 (file)
@@ -27,7 +27,7 @@ struct OPENGL_QSTRIP_DATA
   tel_colour vcolours;    /* Vertex colour values */
   tel_point  vnormals;    /* Vertex normals */
   tel_texture_coord vtexturecoord; /* Texture coordinates */
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 class OpenGl_QuadrangleStrip : public OpenGl_Element
@@ -60,7 +60,7 @@ class OpenGl_QuadrangleStrip : public OpenGl_Element
   DS_INTERNAL *myDS;
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //OpenGl_QuadrangleStrip_Header
index c1f3228..23d254e 100644 (file)
@@ -83,7 +83,7 @@ class OpenGl_Structure : public OpenGl_Element
   OpenGl_ListOfGroup myGroups;
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //OpenGl_Structure_Header
index 614d8be..4191b98 100644 (file)
@@ -35,7 +35,7 @@ class OpenGl_Text : public OpenGl_Element
   const wchar_t  *myString;
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //OpenGl_Text_Header
index 10e1e14..ba99adc 100644 (file)
@@ -15,7 +15,7 @@ struct OpenGl_TextParam
   int                               Height;
   Graphic3d_HorizontalTextAlignment HAlign;
   Graphic3d_VerticalTextAlignment   VAlign;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //_OpenGl_TextParam_Header
index e4493b5..d33264b 100755 (executable)
@@ -85,7 +85,7 @@ struct texData
   texDataStatus status;
   GLint type;
   int share_count;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };  
 
 
@@ -110,7 +110,7 @@ struct texDraw
   GLfloat transx, transy;
   GLfloat angle;
 
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 
index 2095783..8eb465c 100755 (executable)
@@ -48,6 +48,7 @@
 */
 
 #include <OpenGl_tgl_all.hxx>
+#include <Standard_DefineAlloc.hxx>
 
 #include <GL/gl.h>
 
@@ -76,7 +77,7 @@ struct _TextureData
   GLfloat scalex,  scaley;
   GLfloat transx, transy;
   GLfloat angle;
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 typedef _TextureData TextureData;
 
index 78bede7..7bf2df6 100644 (file)
@@ -25,7 +25,7 @@ struct TEL_TMESH_DATA
   tel_colour vcolours;   /* length = num_facets + 2 */
   tel_point  vnormals;   /* length = num_facets + 2 */
   tel_texture_coord vtexturecoord; /* Texture coordinates */
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 class OpenGl_TriangleStrip : public OpenGl_Element
@@ -58,7 +58,7 @@ class OpenGl_TriangleStrip : public OpenGl_Element
   DS_INTERNAL *myDS;
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //OpenGl_TriangleStrip_Header
index f1d6930..cda9cd8 100644 (file)
@@ -49,7 +49,7 @@ class OpenGl_Trihedron : public MMgt_TShared
   OpenGl_AspectText myAspectText;
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //_OpenGl_Trihedron_Header
index ff86022..37782e5 100644 (file)
@@ -61,7 +61,7 @@ struct OPENGL_EXTRA_REP
 struct OPENGL_CLIP_REP
 {
   Standard_Real equation[4];
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 struct OPENGL_ZCLIP
@@ -226,7 +226,7 @@ class OpenGl_View : public MMgt_TShared
   Standard_Boolean myResetFLIST;
 
  public:
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 #endif //_OpenGl_View_Header
index e90dc42..3a7022d 100644 (file)
@@ -59,7 +59,7 @@ struct OPENGL_CLIP_PLANE
 {
   GLboolean isEnabled;
   GLdouble Equation[4];
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 };
 
 /*----------------------------------------------------------------------*/
index 3e80d21..c75d625 100644 (file)
@@ -99,7 +99,7 @@ protected:
 public:
 
   DEFINE_STANDARD_RTTI(OpenGl_Window) // Type definition
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 
 };
 
index f346168..fe2a4ed 100644 (file)
@@ -217,7 +217,7 @@ protected:
 public:
 
   DEFINE_STANDARD_RTTI(OpenGl_Workspace) // Type definition
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 
 };
 
index 3a47169..c9d7a7b 100755 (executable)
@@ -8,7 +8,7 @@
 #include <Poly_CoherentTriangle.hxx>
 
 #ifdef WNT
-#pragma warning(disable:4291 4996)
+#pragma warning(disable:4996)
 #endif
 
 //=======================================================================
index 642e67e..d5d15d6 100755 (executable)
@@ -6,10 +6,6 @@
 
 #include <Poly_CoherentTriPtr.hxx>
 
-#ifdef WNT
-#pragma warning(disable:4291)
-#endif
-
 //=======================================================================
 //function : Iterator::Next
 //purpose  :
index 69706ff..4be0f86 100755 (executable)
@@ -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.
index 49999fa..7d5267c 100755 (executable)
@@ -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) :
index 7ade12e..e72a0ce 100755 (executable)
@@ -62,7 +62,6 @@ Standard_values.h
 Standard_DefineHandle.hxx
 Standard_UUID.cxx
 Standard_UUID.hxx
-StandardCSFDB.cxx
 Standard_Version.hxx
 Standard_Mutex.hxx
 Standard_Mutex.cxx
@@ -73,3 +72,4 @@ Standard_DefineException.hxx
 Standard_MMgrTBBalloc.cxx
 Standard_MMgrTBBalloc.hxx
 Standard_Assert.hxx
+Standard_DefineAlloc.hxx
index f826d61..015ad8e 100755 (executable)
@@ -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)()
       {
index 0500103..2f950a4 100755 (executable)
@@ -3,6 +3,9 @@
 #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
@@ -207,21 +210,8 @@ private:
   Standard_EXPORT void EndScope();
 
 public:
-  // Redefined operators new and delete ensure that handles are 
-  // allocated using OCC memory manager
 
-  void* operator new(size_t,void* anAddress) 
-  {
-    return anAddress;
-  }
-  void* operator new(size_t size) 
-  { 
-    return Standard::Allocate(size); 
-  }
-  void  operator delete(void *anAddress, size_t ) 
-  { 
-    if (anAddress) Standard::Free(anAddress); 
-  }
+  DEFINE_STANDARD_ALLOC
 
 private:
   // Field
index 981daaa..e69de29 100755 (executable)
@@ -1,64 +0,0 @@
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-#include <Standard_PrimitiveTypes.hxx>
-#include <Standard_Persistent.hxx>
-//#include <Standard_Type.hxx>
-//#include <Standard_Stream.hxx>
-#include <Standard.hxx>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
-
-//class Handle(Standard_Type);
-
-//extern const Handle(Standard_Transient)  Standard_TransientNullHandle;
-//extern const Handle(Standard_Persistent) Standard_PersistentNullHandle;
-//const Handle(Standard_Transient)  Standard_TransientNullHandle;
-//const Handle(Standard_Persistent) Standard_PersistentNullHandle;
-
-//---------------------------------------------------
-
-#ifdef WNT
-# include <windows.h>
-# include <winbase.h>
-#endif
-
-//=======================================================================
-//function : CSFDB_Allocate
-//purpose  : 
-//=======================================================================
-
-Standard_Address StandardCSFDB_Allocate(const Standard_Size aSize)
-{
-  return Standard::Allocate( aSize );
-}
-
-
-//=======================================================================
-//function : Free
-//purpose  : 
-//=======================================================================
-
-void StandardCSFDB_Free(Standard_Address& aStorage )
-{
-  Standard::Free( aStorage );
-}
-
-//=======================================================================
-//function : Reallocate
-//purpose  : 
-//=======================================================================
-
-Standard_EXPORT Standard_Address StandardCSFDB_Reallocate
-                                        (Standard_Address&   aStorage,
-                                         const Standard_Size ,
-                                         const Standard_Size newSize)
-{
-  return Standard::Reallocate( aStorage, newSize );
-}
diff --git a/src/Standard/Standard_DefineAlloc.hxx b/src/Standard/Standard_DefineAlloc.hxx
new file mode 100644 (file)
index 0000000..8d33bc3
--- /dev/null
@@ -0,0 +1,69 @@
+// File:        Standard_DefineAlloc.hxx
+// Created:     Jan 19 10:33:16 2012
+// Author:      Dmitry BOBYLEV 
+// Copyright:   Open CASCADE SAS 2012
+
+#ifndef _Standard_DefineAlloc_HeaderFile
+# define _Standard_DefineAlloc_HeaderFile
+
+// Macro to override new and delete operators for arrays.
+// Defined to empty for old SUN compiler
+# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)
+#  define DEFINE_STANDARD_ALLOC_ARRAY
+# else
+#  define DEFINE_STANDARD_ALLOC_ARRAY                                  \
+   void* operator new[] (size_t theSize)                               \
+   {                                                                   \
+     return Standard::Allocate (theSize);                              \
+   }                                                                   \
+   void  operator delete[] (void* theAddress)                          \
+   {                                                                   \
+     Standard::Free (theAddress);                                      \
+   }
+# endif
+
+// Macro to override placement new and placement delete operators. 
+// For Borland C and old SUN compilers do not define placement delete
+// as it is not supported.
+# if defined(__BORLANDC__) || (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530))
+#  define DEFINE_STANDARD_ALLOC_PLACEMENT                              \
+   void* operator new (size_t, void* theAddress)                       \
+   {                                                                   \
+     return theAddress;                                                \
+   }
+# else 
+#  define DEFINE_STANDARD_ALLOC_PLACEMENT                              \
+   void* operator new (size_t, void* theAddress)                       \
+   {                                                                   \
+     return theAddress;                                                \
+   }                                                                   \
+   void operator delete (void*, void*)                                 \
+   {                                                                   \
+   }
+# endif
+
+// Macro to override operators new and delete to use OCC memory manager
+# define DEFINE_STANDARD_ALLOC                                         \
+  void* operator new (size_t theSize)                                  \
+  {                                                                    \
+    return Standard::Allocate (theSize);                               \
+  }                                                                    \
+  void  operator delete (void* theAddress)                             \
+  {                                                                    \
+    Standard::Free ((Standard_Address&)theAddress);                    \
+  }                                                                    \
+  DEFINE_STANDARD_ALLOC_ARRAY                                          \
+  DEFINE_STANDARD_ALLOC_PLACEMENT
+
+// Declare operator new in global scope for old sun compiler
+#ifndef WORKAROUND_SUNPRO_NEW_PLACEMENT
+#define WORKAROUND_SUNPRO_NEW_PLACEMENT
+#if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x420)
+inline void* operator new(size_t,void* anAddress) 
+{
+  return anAddress;
+}
+#endif
+#endif
+
+#endif
\ No newline at end of file
index fce2150..259d304 100755 (executable)
@@ -12,7 +12,7 @@
 #endif /* HAVE_CONFIG_H */
 
 // Standard OCC macros: Handle(), STANDARD_TYPE()
-# define   Handle(ClassName)  Handle_##ClassName
+# define   Handle(ClassName)      Handle_##ClassName
 # define   STANDARD_TYPE(aType)   aType##_Type_()
 
 //======================================================
index cc8e687..89ab6a0 100755 (executable)
@@ -4,6 +4,9 @@
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_PrimitiveTypes_HeaderFile
 #include <Standard_PrimitiveTypes.hxx>
 #endif
@@ -17,8 +20,6 @@ class Handle_Standard_Type;
 class Standard_Type;
 
 class Storage_stCONSTclCOM;
-Standard_EXPORT Standard_Address StandardCSFDB_Allocate(const Standard_Size);
-Standard_EXPORT void StandardCSFDB_Free(Standard_Address&);
 Standard_EXPORT const Handle_Standard_Type& Standard_Persistent_Type_();
 
 class Standard_Persistent
@@ -31,20 +32,9 @@ private:
   Standard_Integer _typenum;
   Standard_Integer _refnum;
 public:
-  // MEMORY MANAGER
-  //
-  void*   operator new (size_t s) {
-    return StandardCSFDB_Allocate(s);
-  }
-
-  void    operator delete (void* p) {
-    StandardCSFDB_Free(p);
-  }
-
-  void* operator new(size_t,void* anAddress) {
-    return anAddress;
-  }
+  
+  DEFINE_STANDARD_ALLOC
+
   Standard_EXPORT virtual Handle_Standard_Persistent This() const;
   Standard_EXPORT virtual Handle_Standard_Persistent ShallowCopy () const;
   Standard_EXPORT virtual void Delete() const;
index 3769171..685a5e0 100755 (executable)
@@ -1,6 +1,9 @@
 #ifndef _Standard_Transient_proto_HeaderFile
 #define _Standard_Transient_proto_HeaderFile
 
+#ifndef _Standard_DefineAlloc_HeaderFile
+#include <Standard_DefineAlloc.hxx>
+#endif
 #ifndef _Standard_Macro_HeaderFile
 #include <Standard_Macro.hxx>
 #endif
@@ -21,21 +24,8 @@ class Standard_Transient
     friend class Handle(Standard_Transient);
 
  public:
-    //! Operator new for placement in pre-allocated memory
-    void* operator new(size_t,void* anAddress) 
-      {
-        return anAddress;
-      }
-    //! Operator new for memory allocation uses Open CASCADE memory manager
-    void* operator new(size_t size) 
-      { 
-        return Standard::Allocate(size); 
-      }
-    //! Operator delete symmetric to operator new
-    void  operator delete(void *anAddress) 
-      { 
-        if (anAddress) Standard::Free((Standard_Address&)anAddress); 
-      }
+    
+    DEFINE_STANDARD_ALLOC
 
     //! Empty constructor
     Standard_Transient() : count(0) {}
index 1a599e0..b91fa24 100755 (executable)
@@ -26,16 +26,5 @@ typedef size_t Standard_Size;
 typedef const char*  Standard_CString;
 typedef const short* Standard_ExtString;
 
-// declare operator new in global scope for old sun compiler
-#ifndef WORKAROUND_SUNPRO_NEW_PLACEMENT
-#define WORKAROUND_SUNPRO_NEW_PLACEMENT
-#if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x420)
-inline void* operator new(size_t,void* anAddress) 
-{
-  return anAddress;
-}
-#endif
-#endif
-
 #endif
 
index dfe9ef0..1c38d29 100755 (executable)
@@ -25,12 +25,12 @@ class Storage_Bucket {
 public:
   Storage_Bucket() : mySpace(0L), mySpaceSize(200000), myCurrentSpace(-1)
     {
-      mySpace = (Standard_Persistent**)StandardCSFDB_Allocate(sizeof(Standard_Persistent*) * mySpaceSize);
+      mySpace = (Standard_Persistent**)Standard::Allocate(sizeof(Standard_Persistent*) * mySpaceSize);
     }
 
   Storage_Bucket(const Standard_Integer theSpaceSize) :  mySpace(0L), mySpaceSize(theSpaceSize), myCurrentSpace(-1)
     {
-      mySpace = (Standard_Persistent**)StandardCSFDB_Allocate(sizeof(Standard_Persistent*) * mySpaceSize);
+      mySpace = (Standard_Persistent**)Standard::Allocate(sizeof(Standard_Persistent*) * mySpaceSize);
     }
 
   void Clear();
index dccb60d..116e729 100755 (executable)
@@ -52,16 +52,11 @@ typedef NCollection_DataMap <TCollection_AsciiString,
 
 #endif
 
-extern Standard_Address StandardCSFDB_Reallocate
-                         (Standard_Address&,
-                          const Standard_Size,
-                          const Standard_Size);
-
 // IMPLEMENTATION BucketOfPersistent
 //
 Storage_Bucket::~Storage_Bucket()
 {
-  StandardCSFDB_Free((Standard_Address&)mySpace);
+  Standard::Free((Standard_Address&)mySpace);
   mySpace = 0L;
   mySpaceSize = 0;
   Clear();
@@ -110,7 +105,7 @@ Storage_BucketOfPersistent::Storage_BucketOfPersistent
 : myNumberOfBucket(1),myNumberOfBucketAllocated(theBucketNumber),myBucketSize
                          (theBucketSize)
 {
-  myBuckets =  (Storage_Bucket**)StandardCSFDB_Allocate
+  myBuckets =  (Storage_Bucket**)Standard::Allocate
                          (sizeof(Storage_Bucket*) * theBucketNumber);
   myBuckets[0] = new Storage_Bucket(myBucketSize);
   myCurrentBucket = myBuckets[0];
@@ -141,7 +136,7 @@ Storage_BucketOfPersistent::~Storage_BucketOfPersistent()
 {
   Clear();
   delete myBuckets[0];
-  StandardCSFDB_Free((Standard_Address&)myBuckets);
+  Standard::Free((Standard_Address&)myBuckets);
   myBuckets = 0L;
 }
 
@@ -182,7 +177,7 @@ void Storage_BucketOfPersistent::Append(const Handle(Standard_Persistent)& sp)
 
   if (myNumberOfBucket > myNumberOfBucketAllocated) {
     Standard_Size e = sizeof(Storage_Bucket*) * myNumberOfBucketAllocated;
-    myBuckets =  (Storage_Bucket**)StandardCSFDB_Reallocate((Standard_Address&)myBuckets,e,e * 2);
+    myBuckets =  (Storage_Bucket**)Standard::Reallocate((Standard_Address&)myBuckets, e * 2);
     myNumberOfBucketAllocated *= 2;
   }
 
index 5cd9c7f..a2df411 100755 (executable)
@@ -7,6 +7,7 @@
 #ifndef TColStd_PackedMapOfInteger_HeaderFile
 #define TColStd_PackedMapOfInteger_HeaderFile
 
+#include <Standard_DefineAlloc.hxx>
 #include <TCollection_BasicMap.hxx>
 
 /**
@@ -19,10 +20,7 @@ class TColStd_PackedMapOfInteger : private TCollection_BasicMap
  public:
   // operators new and delete must be defined explicitly 
   // since inherited ones are not accessible
-  void* operator new(size_t size) 
-  { return TCollection_BasicMap::operator new(size); }
-  void  operator delete(void *anAddress) 
-  { TCollection_BasicMap::operator delete (anAddress); }
+  DEFINE_STANDARD_ALLOC
   
  public:
   // ---------- PUBLIC METHODS ----------
index 88fee66..5943d23 100755 (executable)
@@ -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 ~.
index b0075be..8e7f7a2 100755 (executable)
@@ -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.
index 5293a8a..581c834 100755 (executable)
@@ -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
\ No newline at end of file
index d82752d..e4f002b 100755 (executable)
@@ -77,23 +77,7 @@ public:
   Standard_Boolean IsValidInTrans(Standard_Integer Trans);
 
   // Memory management
-  void* operator new(size_t aSize) {
-    return Standard::Allocate(aSize);
-  }
-
-/* attempt to eliminate compiler warning  
-  void* operator new(size_t, void* aNode) {
-    return aNode;
-  }
-  
-  void  operator delete(void* aNode) {
-    Standard::Free(aNode);
-  }
-*/
-  
-  void  operator delete(void* aNode, size_t aSize) {
-    Standard::Free(aNode);
-  }
+  DEFINE_STANDARD_ALLOC
   
   TNaming_PtrRefShape  myOld;
   TNaming_PtrRefShape  myNew;
index faafbbb..a0a795d 100755 (executable)
@@ -35,7 +35,7 @@ private:
 
 public:
 
-  IMPLEMENT_MEMORY_OPERATORS
+  DEFINE_STANDARD_ALLOC
 
 };