IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 3, 2006, 8:48:32 AM (20 years ago)
Author:
eugene
Message:

added missing frees

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotReadout.c

    r6311 r6319  
    11# include "psphot.h"
     2
     3# define MEM_0 psMemId ID = psMemGetId ();
     4# define MEM_1(A) \
     5    psTimerStop ();\
     6    if (A != NULL) { psFree (A); } \
     7    fprintf (stderr, "found %d leaks\n", psMemCheckLeaks (ID, NULL, NULL, false));\
     8    exit (1);
    29
    310bool psphotReadout (pmReadout *readout, psMetadata *config) {
     
    815    psStats     *sky     = NULL;
    916    bool         status;
     17    psPolynomial2D *model = NULL;
    1018
    1119    psphotSaveImage (NULL, readout->mask, "mask.fits");
     
    1826    // generate a background model (currently, 2D polynomial)
    1927    // XXX this should be available to be re-added to the original image
    20     psphotImageBackground (readout, config, sky);
     28    model = psphotImageBackground (readout, config, sky);
    2129
    2230    // find the peaks in the image
     
    3341
    3442    // use bright stellar objects to measure PSF
     43    MEM_0;
    3544    psf = psphotChoosePSF (config, sources, sky);
     45    MEM_1(psf);
    3646
    3747    // XXX change FITMODE to a string
Note: See TracChangeset for help on using the changeset viewer.