IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 2, 2004, 10:03:22 AM (22 years ago)
Author:
desonia
Message:

Modified psFree to just decrement the ref. counter if it is > 1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sysUtils/psMemory.h

    r803 r830  
    1212 *  @author Robert Lupton, Princeton University
    1313 *
    14  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-05-28 03:17:39 $
     14 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-06-02 20:03:22 $
    1616 *
    1717 *  @ingroup SystemGroup System Utilities
     
    2121
    2222#include <stdio.h>                      // needed for FILE
    23 
     23#include <pthread.h>                   // we need a mutex to make this stuff thread safe.
    2424
    2525/** @addtogroup MemoryManagement Memory Management Utilities
     
    6464    const char* file;                   ///< set from __FILE__ in e.g. p_psAlloc
    6565    const int lineno;                   ///< set from __LINE__ in e.g. p_psAlloc
    66     // TODO: refCounter should be mutexed?
     66    pthread_mutex_t   refCounterMutex;  ///< mutex to ensure exclusive access to reference counter
    6767    psReferenceCount refCounter;        ///< how many times pointer is referenced
    6868    const void* endblock;               ///< initialised to p_psMEMMAGIC
Note: See TracChangeset for help on using the changeset viewer.