Changeset 6342 for branches/eam_rel9_p0/psModules/src/astrom/pmChipMosaic.c
- Timestamp:
- Feb 7, 2006, 11:18:31 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_rel9_p0/psModules/src/astrom/pmChipMosaic.c
r6145 r6342 6 6 #include "pmChipMosaic.h" 7 7 8 #define MEM_LEAKS 18 #define MEM_LEAKS 0 9 9 10 10 // Compare a value with a maximum and minimum … … 156 156 continue; 157 157 } 158 159 psMetadataPrint(cell->concepts, 10); 160 158 161 nCells++; 159 162 gain += psMetadataLookupF32(NULL, cell->concepts, "CELL.GAIN"); … … 266 269 267 270 // The images to put into the mosaic 268 images->data[i] = readout->image;269 weights->data[i] = readout->weight;270 masks->data[i] = readout->mask;271 images->data[i] = psMemIncrRefCounter(readout->image); 272 weights->data[i] = psMemIncrRefCounter(readout->weight); 273 masks->data[i] = psMemIncrRefCounter(readout->mask); 271 274 } 272 275 // Mosaic the images together and we're done … … 311 314 312 315 // Chop off all the component cells, and put in a new one 313 #if ndefMEM_LEAKS316 #if !MEM_LEAKS 314 317 pmChipFreeCells(chip); 315 318 #else … … 321 324 cellConcepts(cell, cells, xBinChip, yBinChip); 322 325 323 #if 1326 #if 0 324 327 // XXX For the sake of getting something working, I am not going to bother with sorting out where 325 328 // the double free is coming from. I'm going to drop the pointers on the array and create a memory 326 329 // leak. We can clean this up later, when we're not under as much pressure. 327 #else328 329 330 psArrayElementsFree(chip->cells); 330 331 chip->cells->n = 0; … … 337 338 // Want the readouts to contain a subimage, but that subimage is the whole image. 338 339 // This preserves the relationship there was before, where freeing the parent frees the child. 339 readout->image = ps MemIncrRefCounter(psImageSubset(image, entire));340 readout->weight = ps MemIncrRefCounter(psImageSubset(weight, entire));341 readout->mask = ps MemIncrRefCounter(psImageSubset(mask, entire));340 readout->image = psImageSubset(image, entire); 341 readout->weight = psImageSubset(weight, entire); 342 readout->mask = psImageSubset(mask, entire); 342 343 psFree(readout); 343 344
Note:
See TracChangeset
for help on using the changeset viewer.
