On Wed, 21 Mar 2007, Tim Jenness wrote:
> On Wed, 21 Mar 2007, Peter W. Draper wrote:
>
> >> If I remove the AXIS component from the test file I don't get any locator
> >> leaks. Naively this looks like a bug in NDF or ARY but I'm a bit confused
> >> as to why we don't see it all the time when I use KAPPA to read these
> >> images.
> >>
> >> Maybe I've missed some tidy up code? (ndfBegin/End/Init don't help).
> >
> > No, the code is fine. There's also no unintended leak here either, I
> > think. What happens is that your AXIS component is mapped as _DOUBLE so
> > requires a temporary array (since it has type _REAL, the mapping to
> > _DOUBLE happens while merging the AXIS structure into the WCS). Now HDS
> > leaves any temporary files open by hanging onto a locator and cleans these
> > up with the exit handling code, so you'd expect to see a locator to any
> > temporary files still active at this stage.
>
> so does my leak checking code always have to filter out HDS_SCRATCH
> locators as well? And no way to give HDS a kick with the temp files?
That's right.
Having HDS filter this file out would seem to be the correct thing, it
handles the life cycle.
Peter.
|