Changeset 4997 for trunk/psModules/src/pmAstrometry.c
- Timestamp:
- Sep 12, 2005, 10:38:25 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/pmAstrometry.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/pmAstrometry.c
r4992 r4997 8 8 * @author GLG, MHPCC 9 9 * 10 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-09-1 1 22:25:39$10 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-09-12 20:38:25 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 47 47 XXX: Is this the correct way to free metadata? 48 48 XXX: Is this the correct way to free database structs? 49 50 XXX: The meory dereferencing is not quite right with these functions. If I 51 call the alloc functions with non-NULL pointers, there will be memory leaks. 49 52 *****************************************************************************/ 50 51 53 static void FPAFree(pmFPA *fpa) 52 54 { … … 120 122 tmpReadout->concepts = psMetadataAlloc(); 121 123 tmpReadout->parent = cell; 122 124 psMemIncrRefCounter((psPtr) cell); 123 125 if (cell != NULL) { 124 126 cell->readouts = psArrayAdd(cell->readouts, 1, (psPtr) tmpReadout); … … 141 143 tmpCell->readouts = psArrayAlloc(0); 142 144 tmpCell->parent = chip; 145 psMemIncrRefCounter((psPtr) chip); 143 146 if (chip != NULL) { 144 147 chip->cells = psArrayAdd(chip->cells, 1, (psPtr) tmpCell); … … 165 168 tmpChip->cells = psArrayAlloc(0); 166 169 tmpChip->parent = fpa; 170 psMemIncrRefCounter((psPtr) fpa); 167 171 if (fpa != NULL) { 168 172 fpa->chips = psArrayAdd(fpa->chips, 1, (psPtr) tmpChip); 173 psMemIncrRefCounter((psPtr) tmpChip); 169 174 } 170 175 tmpChip->valid = false; … … 189 194 tmpFPA->analysis = psMetadataAlloc(); 190 195 tmpFPA->camera = camera; 196 psMemIncrRefCounter((psPtr) camera); 191 197 tmpFPA->chips = psArrayAlloc(0); 192 198 tmpFPA->header = NULL; 193 199 tmpFPA->db = db; 200 psMemIncrRefCounter((psPtr) db); 194 201 195 202 psMemSetDeallocator(tmpFPA, (psFreeFunc) FPAFree);
Note:
See TracChangeset
for help on using the changeset viewer.
