IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 17, 2005, 1:44:22 PM (21 years ago)
Author:
desonia
Message:

added enhancement to psFree so that it sets the reference being freed to
NULL (thanks Gus).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/sysUtils/tst_psMemory.c

    r3682 r4308  
    66*  @author Robert DeSonia, MHPCC
    77*
    8 *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2005-04-07 20:27:42 $
     8*  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2005-06-17 23:44:22 $
    1010*
    1111*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    130130    psLogMsg( __func__, PS_LOG_INFO, "psFree shall be just decrement a multiple refererenced pointer." );
    131131
    132     psFree( mem );
     132    psMemDecrRefCounter( mem );
    133133
    134134    ref = psMemGetRefCounter( mem );
     
    521521{
    522522
    523     psPtr  buffer = psAlloc( 1024 );
     523    psPtr buffer = psAlloc( 1024 );
     524    psPtr buffer2 = buffer;
    524525
    525526    psFree( buffer );
    526527
    527528    psLogMsg( __func__, PS_LOG_INFO, "Next should abort due to multiple freeing." );
    528     psFree( buffer );
     529    psFree( buffer2 );
    529530
    530531    psError(PS_ERR_UNKNOWN,true,
Note: See TracChangeset for help on using the changeset viewer.