|
From: Roger H. <rog...@mi...> - 2007-01-30 17:16:34
|
Hi All,
I like the sound of this new OpenGL optimised renderer.
Could someone see if they agree with what appears to be
a memory leak in E3AttributeSet_Inherit. I have a provisional
fix which is:
In this section of code, change the last but one line
// Process the child
if ( qd3dStatus == kQ3Success )
{
// Copy the mask and attributes directly
resultSet->setData.theMask = childSet->setData.theMask ;
resultSet->setData.attributes = childSet->setData.attributes ;
if ( resultSet->setData.attributes.surfaceShader != NULL )
resultSet->setData.attributes.surfaceShader =
Q3Shared_GetReference ( childSet->setData.attributes.surfaceShader ) ;
to read:
if ( resultSet->setData.attributes.surfaceShader != NULL && result !
= child )
When E3AttributeSet_Inherit gets called with child == result, the
reference count of surface
shaders gets incremented incorrectly, which loses huge amounts of
memory with even
modest sized textures if you call this routine a lot, which I do when
doing the CSG
calculations for windows and doors within walls, which is now done
for almost every time
redraw.
If you agree with the change, could you check it in, or remind me how
to do it
as I have not done a Quesa check in for some time and I've forgotten
how.
Anyone got some new old stock RAM for a 1953 biological computer?
You can't get the parts you know!
Roger Holmes.
|