AudioBuffer potential leak
by Jeremiah Fulbright · in Torque Game Engine Advanced · 11/10/2006 (5:12 am) · 1 replies
This has been fixed in the past via some forum posts or a resource, but still hasn't made it into TSE for some reason. So I am just posting it here for others who haven't looked back thru the TGE forums for various bug fixes.
audioBuffer.cpp, around Line 365, you should find:
That needs to be changed to
Otherwise, if something happens during the attempt to load an Ogg file, it could possibly leave a stream open.
audioBuffer.cpp, around Line 365, you should find:
if(vf.ov_open(stream, NULL, 0) < 0) {
return false;
}That needs to be changed to
if(vf.ov_open(stream, NULL, 0) < 0) {
ResourceManager->closeStream(stream);
return false;
}Otherwise, if something happens during the attempt to load an Ogg file, it could possibly leave a stream open.
Torque Owner AcidFaucet
At least it only takes 15 minutes to patch it all up manually, that's not too bad.