Re: NEED HELP: My program dies only on Onyx

New Message Reply Date view Thread view Subject view Author view

Marcus Barnes (marcus++at++multigen.com)
Wed, 20 May 1998 10:35:56 -0700


On May 20, 10:11am, TaiSun kang wrote:
>I suspect that textures are not freed well on Onyx.
>Running program with scene descriptions files wit no textures
>worked well. I am freeing textures with codes like
>
> pfDelete( tex );
> if ( tex->getRef() == 0 )
         ^^^
You are accessing potentially free memory here.

> {
> tex->freeImage();
> tex->apply();
> }

Change this to:

   if ( tex->getRef() == 0 )
   {
       tex->freeImage();
       tex->apply();
       pfDelete( tex );
   }

Regards.

--
+ Marcus Barnes, Technical Staff        mailto:marcus++at++multigen.com +
+ Multigen Inc.                         http://www.multigen.com    +
+ 550 S. Winchester Blvd.               phoneto:1-408-556-2654     +
+ Suite 500 San Jose CA 95128           faxto:1-408-261-4103       +
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:25 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.