IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 23, 2004, 1:00:17 PM (22 years ago)
Author:
desonia
Message:

Changed the means of deallocation of memory. ps_Alloc now registers an optional free function to handle any additional processing of a memory object.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/collections/psBitSet.c

    r1041 r1073  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-06-15 02:45:43 $
     12 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-06-23 23:00:15 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5555/*  FUNCTION IMPLEMENTATION - LOCAL                                          */
    5656/*****************************************************************************/
     57static void bitSetFree(psBitSet *restrict inBitSet);
     58
    5759
    5860/** Private function to create a mask.
     
    8890    numBytes = ceil(n/8.0);
    8991    newObj = psAlloc(sizeof(psBitSet));
     92    p_psMemSetDeallocator(newObj,(psFreeFcn)bitSetFree);
    9093    newObj->n = numBytes;
    9194
     
    98101}
    99102
    100 void psBitSetFree(psBitSet *restrict inBitSet)
     103static void bitSetFree(psBitSet *restrict inBitSet)
    101104{
    102105    if(inBitSet == NULL) {
     
    105108    }
    106109    psFree(inBitSet->bits);
    107     psFree(inBitSet);
    108110}
    109111
Note: See TracChangeset for help on using the changeset viewer.