From: MLM Veraart (veraart++at++fel.tno.nl)
Date: 06/23/2004 09:14:10
Simon Perreault wrote:
>
> Hi,
>
> You'll probably hate me for asking this, but here's a simple question.
> Why does this leak?
>
> #include <Performer/pfdu.h>
> #include <Performer/pf/pfNode.h>
>
> int main( int argc, char* argv[] )
> {
> pfInit();
> pfFilePath(".");
> pfdInitConverter( "3ds" );
> pfConfig();
>
> while (1) {
> pfNode* node = pfdLoadFile( "somefile.3ds" );
> delete node;
> }
> }
You must remove a node with a call to pfDelete(pfNode*)
And you must call pfFrame() within the while loop to delete
the geometry for real.
Deletion is delayed a few frames, CULL, DRAW and ISECT may need the nodes.
Mario
-- ------------------------------------------------------------------------------ The disclaimer that applies to e-mail from TNO Physics and Electronics Laboratory can be found on: http://www.tno.nl/disclaimer/email.html ------------------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Wed Jun 23 2004 - 09:14:50 PDT