Ignore:
Timestamp:
Oct 6, 2009, 11:15:50 AM (16 years ago)
Author:
metzler <metzler@…>
Children:
53f32e
Parents:
bf497f
Message:

#22 Write a critical exit function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/memoryallocator.hpp

    rbf497f r729279  
    111111 * \param pointer to the allocated memory range to free; may be NULL, this function is a no-op then
    112112 */
    113 template <typename X> void Free(X** buffer)
     113template <typename X> void Free(X** buffer, const char *msg = NULL)
    114114{
    115115  if ((buffer == NULL) || (*buffer == NULL))
    116116    return;
    117117
    118   MemoryUsageObserver::getInstance()->removeMemory(*buffer);
     118  MemoryUsageObserver::getInstance()->removeMemory(*buffer, msg);
    119119  free(*buffer);
    120120  *buffer = NULL;
Note: See TracChangeset for help on using the changeset viewer.