Changeset 069034 for molecuilder/src/memoryallocator.hpp
- Timestamp:
- Oct 27, 2009, 5:16:31 PM (16 years ago)
- Children:
- 6d7651
- Parents:
- a9b2a0a
- git-author:
- Frederik Heber <heber@…> (10/27/09 16:42:42)
- git-committer:
- Frederik Heber <heber@…> (10/27/09 17:16:31)
- File:
-
- 1 edited
-
molecuilder/src/memoryallocator.hpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/memoryallocator.hpp
ra9b2a0a r069034 105 105 }; 106 106 107 /** Frees allocated memory range using free() .107 /** Frees allocated memory range using free(), NULL'ing \a **buffer. 108 108 * 109 * \param pointer to the allocated memory range to free; may be NULL, this function is a no-op then109 * \param **buffer to the allocated memory range to free; may be NULL, this function is a no-op then 110 110 * \param *msg optional error message 111 111 */ … … 120 120 }; 121 121 122 /** Frees allocated memory range using free() for ... * const \a buffer types. 123 * 124 * \param *buffer to the allocated memory range to free; may be NULL, this function is a no-op then 125 * \param *msg optional error message 126 */ 127 template <typename X> void Free(X* const buffer, const char *msg = NULL) 128 { 129 if ((buffer == NULL)) 130 return; 131 132 MemoryUsageObserver::getInstance()->removeMemory(buffer, msg); 133 free(buffer); 134 }; 135 122 136 #endif /*MEMORYALLOCATOR_HPP_*/
Note:
See TracChangeset
for help on using the changeset viewer.
