[vorbis-dev] Borland modification

Monty xiphmont at xiph.org
Tue Aug 29 17:31:08 PDT 2000



> 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.

It's easy enough to check and close pipes with pclose (I'll consult Stevens).

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

Yes, but the 'object' in this case (the FILE *) is being relinquished to 
vorbisfile, and the fact that vorbisfile has to choose amongst a number of 
possible 'destructors' is not a failure in the vorbisfile abstraction, it's 
simply pointing up that C (and the ANSI libs) can be objectified only so far.

Monty

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



More information about the Vorbis-dev mailing list