don't leak the Factor stream when the vorbis-stream finishes

release
Joe Groff 2010-01-25 20:27:07 -08:00
parent 9e1f2f422f
commit 0cd75fb177
1 changed files with 2 additions and 1 deletions

View File

@ -233,7 +233,7 @@ PRIVATE>
] with-destructors ;
: read-vorbis-stream ( filename buffer-size -- vorbis-stream )
[ binary <file-reader> ] dip <vorbis-stream> ; inline
[ [ binary <file-reader> |dispose ] dip <vorbis-stream> ] with-destructors ; inline
M: vorbis-stream dispose*
{
@ -246,6 +246,7 @@ M: vorbis-stream dispose*
[ page>> [ free ] when* ]
[ sync-state>> [ free ] when* ]
[ packet>> [ free ] when* ]
[ stream>> [ dispose ] when* ]
} cleave ;
M: vorbis-stream generator-audio-format