IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 21, 2006, 5:23:32 PM (20 years ago)
Author:
Paul Price
Message:

Trying to fix memory leaks, but they are a long way down; too hard to find for now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_rel9_p0/psModules/src/astrom/pmChipMosaic.c

    r6124 r6145  
    55#include "pmFPA.h"
    66#include "pmChipMosaic.h"
     7
     8#define MEM_LEAKS 1
    79
    810// Compare a value with a maximum and minimum
     
    309311
    310312    // Chop off all the component cells, and put in a new one
     313    #ifndef MEM_LEAKS
     314    pmChipFreeCells(chip);
     315    #else
     316
    311317    chip->cells = psArrayAlloc(0);
     318    #endif
     319
    312320    pmCell *cell = pmCellAlloc(chip, NULL, __func__); // New cell
    313321    cellConcepts(cell, cells, xBinChip, yBinChip);
    314     psFree(cells);
    315322
    316323    #if 1
     
    330337    // Want the readouts to contain a subimage, but that subimage is the whole image.
    331338    // This preserves the relationship there was before, where freeing the parent frees the child.
    332     readout->image = psImageSubset(image, entire);
    333     readout->weight = psImageSubset(weight, entire);
    334     readout->mask = psImageSubset(mask, entire);
     339    readout->image = psMemIncrRefCounter(psImageSubset(image, entire));
     340    readout->weight = psMemIncrRefCounter(psImageSubset(weight, entire));
     341    readout->mask = psMemIncrRefCounter(psImageSubset(mask, entire));
    335342    psFree(readout);
    336343
Note: See TracChangeset for help on using the changeset viewer.