https://github.com/OpenImageIO/oiio/pull/581
I believe this will fix the problem. I'm pretty sure that the docs don't say anything that would guarantee that the ImageInput dtr will close a file if still opened (without an explicit call to close by the app). But almost all of them did call close automatically upon destruction. SGI, IFF, and PNM were the only ones that did not. On Apr 23, 2013, at 9:37 AM, Larry Gritz wrote: > Are you explicitly calling imageinput->close()? Or just destroying it? > > I noticed that the destructor does not seem to automatically call close. (It > probably should.) > > > > On Apr 23, 2013, at 1:27 AM, Michel Lerenard wrote: > >> Hi everyone >> >> we have an issue with SGI file, and i'm wondering if there could be a bug in >> the SGI plugin. >> The issue we have is that OIIO seems to lock or to leave the file handle >> opened after we use it. >> >> Typically we load a SGI map using an ImageInput object, which is destroyed >> after load. We then work with data in memory only. Problem, we can't rename >> the file on the drive (or overwrite it), because it is already opened. >> There is no error during load, the texture is displayed correctly. >> >> We don't have this problem with other format. >> I've had a quick look in the plugin source and found no obvious error in the >> code. What could prevent the close() function from being called ? >> >> >> _______________________________________________ >> Oiio-dev mailing list >> [email protected] >> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org > > -- > Larry Gritz > [email protected] > > > _______________________________________________ > Oiio-dev mailing list > [email protected] > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org -- Larry Gritz [email protected] _______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
