[vorbis-dev] Borland modification

Bob Miller kbob at jogger-egg.com
Tue Aug 29 16:46:03 PDT 2000



Monty wrote:

> Yes.  The basic thinking is that the source module should relinquish
> all control of the FILE *, as any external interference will confuse
> (at best) or crash (at worst) vorbisfile.  As the source of the FILE
> * must be totally hands-off anyway, Vorbisfile assumes
> responsibility of cleanup as well.

The best reason not to do that is popen.  (On Unix,) fclose is right
for files opened by fopen or fdopen, but pipes opened by popen
should be closed by pclose.  So if vorbisfile insists on calling
fclose, then it can't do I/O to pipes.

In general, it's goodness to keep the destructor at the same level as the
constructor.


-- 
                                        K<bob>
kbob at jogger-egg.com, http://www.jogger-egg.com/

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/




More information about the Vorbis-dev mailing list