IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 12, 2005, 10:38:25 AM (21 years ago)
Author:
gusciora
Message:

....

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/pmAstrometry.c

    r4992 r4997  
    88*  @author GLG, MHPCC
    99*
    10 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2005-09-11 22:25:39 $
     10*  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2005-09-12 20:38:25 $
    1212*
    1313*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4747XXX: Is this the correct way to free metadata?
    4848XXX: Is this the correct way to free database structs?
     49 
     50XXX: The meory dereferencing is not quite right with these functions.  If I
     51call the alloc functions with non-NULL pointers, there will be memory leaks.
    4952 *****************************************************************************/
    50 
    5153static void FPAFree(pmFPA *fpa)
    5254{
     
    120122    tmpReadout->concepts = psMetadataAlloc();
    121123    tmpReadout->parent = cell;
    122 
     124    psMemIncrRefCounter((psPtr) cell);
    123125    if (cell != NULL) {
    124126        cell->readouts = psArrayAdd(cell->readouts, 1, (psPtr) tmpReadout);
     
    141143    tmpCell->readouts = psArrayAlloc(0);
    142144    tmpCell->parent = chip;
     145    psMemIncrRefCounter((psPtr) chip);
    143146    if (chip != NULL) {
    144147        chip->cells = psArrayAdd(chip->cells, 1, (psPtr) tmpCell);
     
    165168    tmpChip->cells = psArrayAlloc(0);
    166169    tmpChip->parent = fpa;
     170    psMemIncrRefCounter((psPtr) fpa);
    167171    if (fpa != NULL) {
    168172        fpa->chips = psArrayAdd(fpa->chips, 1, (psPtr) tmpChip);
     173        psMemIncrRefCounter((psPtr) tmpChip);
    169174    }
    170175    tmpChip->valid = false;
     
    189194    tmpFPA->analysis = psMetadataAlloc();
    190195    tmpFPA->camera = camera;
     196    psMemIncrRefCounter((psPtr) camera);
    191197    tmpFPA->chips = psArrayAlloc(0);
    192198    tmpFPA->header = NULL;
    193199    tmpFPA->db = db;
     200    psMemIncrRefCounter((psPtr) db);
    194201
    195202    psMemSetDeallocator(tmpFPA, (psFreeFunc) FPAFree);
Note: See TracChangeset for help on using the changeset viewer.