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/src/collections/psMetadata.c

    r4094 r4308  
    1212*  @author Ross Harman, MHPCC
    1313*
    14 *  @version $Revision: 1.64 $ $Name: not supported by cvs2svn $
    15 *  @date $Date: 2005-06-03 02:07:51 $
     14*  @version $Revision: 1.65 $ $Name: not supported by cvs2svn $
     15*  @date $Date: 2005-06-17 23:44:21 $
    1616*
    1717*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    8989
    9090    psHashAdd(table, key, item); // put in the new entry
     91    psMemDecrRefCounter(item); // get rid of extra reference
    9192
    9293    // free local references of newly allocated items.
    9394    psFree(newList);
    94     psFree(item);
    9595
    9696    return item;
     
    107107    }
    108108
    109     psFree(metadataItem->name);
    110     psFree(metadataItem->comment);
     109    psMemDecrRefCounter(metadataItem->name);
     110    psMemDecrRefCounter(metadataItem->comment);
    111111
    112112    if(!PS_META_IS_PRIMITIVE(type)) {
Note: See TracChangeset for help on using the changeset viewer.