IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36618


Ignore:
Timestamp:
Mar 29, 2014, 12:55:09 PM (12 years ago)
Author:
eugene
Message:

free up fits tables

Location:
branches/eam_branches/ipp-20140206/Ohana/src/relphot/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/ImageMagIO.c

    r36545 r36618  
    5353  fclose (f);
    5454
    55   // a bit annoying : we read the entire block of data, then extract the columns, then set the image structure values.
    56   // this means I need 3 copies in memory at some point.  ugh.
     55  // we read the entire block of data, then extract the columns, then set the image structure values.
     56  // I free the FITS table data after extracting the colums to avoid having 3 copies in memory.
    5757
    5858  char type[16];
     
    6666  GET_COLUMN (ubercalDist,       "UDIST",            int);
    6767  GET_COLUMN (imageID,           "ID",               int);
     68
     69  // free the memory associated with the FITS files
     70  gfits_free_header (&header);
     71  gfits_free_matrix (&matrix);
     72  gfits_free_header (&theader);
     73  gfits_free_table (&ftable);
    6874
    6975  ALLOCATE (image_mags, ImageMag, Nrow);
  • branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/MeanMagIO.c

    r36616 r36618  
    6464  GET_COLUMN (objID,     "OBJ_ID",       int);
    6565  GET_COLUMN (catID,     "CAT_ID",       int);
     66
     67  // free the memory associated with the FITS files
     68  gfits_free_header (&header);
     69  gfits_free_matrix (&matrix);
     70  gfits_free_header (&theader);
     71  gfits_free_table (&ftable);
    6672
    6773  ALLOCATE (meanmags, MeanMag, Nrow);
     
    8389  free (catID);
    8490
    85   // free FITS table pieces...
    86 
    8791  *nmeanmags = Nrow;
    8892  return meanmags;
Note: See TracChangeset for help on using the changeset viewer.