ML Reference
MeVis/Foundation/Sources/MLUtilities/mlMemory.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //-------------------------------------------------------------------------
00004 
00009 //-------------------------------------------------------------------------
00010 #ifndef __mlMemory_H
00011 #define __mlMemory_H
00012 
00013 // ML-includes
00014 #ifndef __mlUtilsSystem_H
00015 #include "mlUtilsSystem.h"
00016 #endif
00017 
00018 #ifndef __mlUtilsAPI_H
00019 #include "mlUtilsAPI.h"
00020 #endif
00021 
00022 ML_UTILS_START_NAMESPACE
00023 
00024   //----------------------------------------------------------------------
00027   //----------------------------------------------------------------------
00028   class ML_UTILS_EXPORT Memory {
00029   public:
00030 
00031 
00036     static void* allocateMemory(MLuint numBytes, MLMemoryErrorHandling handleFailure) ML_RETURN_VALUE_SHOULD_BE_USED;
00037 
00043     static void* reallocateMemory(void* ptr, MLuint numBytes, MLMemoryErrorHandling handleFailure) ML_RETURN_VALUE_SHOULD_BE_USED;
00044 
00048     static void  freeMemory(void* ptr);
00049 
00055     static void* duplicateMemory(const void* ptr, MLuint numBytes, MLMemoryErrorHandling handleFailure) ML_RETURN_VALUE_SHOULD_BE_USED;
00056 
00060     static char* duplicateString(const char *str, MLMemoryErrorHandling handleFailure) ML_RETURN_VALUE_SHOULD_BE_USED;
00061   };
00062 
00063 ML_UTILS_END_NAMESPACE
00064 
00065 #endif // __mlMemory_H
00066 
00067 
00068 
00069 
00070 
00071