diff options
Diffstat (limited to 'include/m_system_cpp.h')
-rw-r--r-- | include/m_system_cpp.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/m_system_cpp.h b/include/m_system_cpp.h index c42bd68272..ea8098f24a 100644 --- a/include/m_system_cpp.h +++ b/include/m_system_cpp.h @@ -63,6 +63,20 @@ public: };
///////////////////////////////////////////////////////////////////////////////
+// basic class for classes that should be cleared inside new()
+
+class MZeroedObject
+{
+public:
+ __inline void* operator new( size_t size )
+ { return calloc( 1, size );
+ }
+ __inline void operator delete( void* p )
+ { free( p );
+ }
+};
+
+///////////////////////////////////////////////////////////////////////////////
// general lists' templates
#define NumericKeySortT -1
|