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).

Location:
trunk/psLib/src/sysUtils
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sysUtils/psErrorCodes.c

    r3682 r4308  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-04-07 20:27:41 $
     9 *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-06-17 23:44:21 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2929 *     $2  The error description (rest of the line in psErrorCodes.dat)
    3030 *     $n  The order of the source line in psErrorCodes.dat (comments excluded)
    31  * 
     31 *
    3232 * DO NOT EDIT THE LINES BETWEEN //~Start and //~End!  ANY CHANGES WILL BE OVERWRITTEN.
    3333 */
     
    9090static void freeErrorDescription(psErrorDescription* err)
    9191{
    92     psFree((psPtr)err->description);
     92    psFree(err->description);
    9393}
    9494
  • trunk/psLib/src/sysUtils/psMemory.h

    r4298 r4308  
    1212 *  @ingroup MemoryManagement
    1313 *
    14  *  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-06-17 21:42:02 $
     14 *  @version $Revision: 1.39 $ $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
     
    239239/// Free memory.  psFree sends file and line number to p_psFree.
    240240#ifndef SWIG
    241 #define psFree(ptr) p_psFree(ptr, __FILE__, __LINE__)
     241#define psFree(ptr) { p_psFree((psPtr)ptr, __FILE__, __LINE__);  *(void**)&ptr = NULL; }
    242242#endif // ! SWIG
    243243
  • trunk/psLib/src/sysUtils/psTrace.c

    r4162 r4308  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-06-08 23:40:45 $
     11 *  @version $Revision: 1.50 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-06-17 23:44:21 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    9797
    9898    p_psMemSetPersistent((psPtr)comp->name,false);
    99     psFree((psPtr)comp->name);
     99    psFree(comp->name);
    100100}
    101101
Note: See TracChangeset for help on using the changeset viewer.