code: def close(self):
          
          if self._image is None:
              return
  
          # mcara: I think the code below is not necessary but in order to
          #        preserve the same functionality as the code removed below,
          #        I make an empty copy of the image object:
          empty_image = fits.HDUList()
          for u in self._image:
              empty_image.append(u.__class__(data=None, header=None))
          # mcara: END unnecessary code
  
          self._image.close()  #calls fits.close()
  
          self._image = empty_image
docs: Close the object nicely and release all the data
              arrays from memory YOU CANT GET IT BACK, the pointers
              and data are gone so use the getData method to get
              the data array returned for future use. You can use
              putData to reattach a new data array to the imageObject.