[info-performer]pfTexture->loadFile() memory leak?

New Message Reply Date view Thread view Subject view Author view

From: rvhaasen++at++xs4all.nl
Date: 04/14/2003 07:10:39


Hi,

if pfTexture->loadFile() is called, the previous image's reference
count is decremented as it should. However, it doesn't pfDelete
the image when the refcount is 0.

more specific :

while(1) {
   texture->loadFile("texture.jpg");
}

crashes because of memory exhaustion.

the workaround:

while(1) {
   texture->getImage(&img, &comp, &nr, &ns, &nt);
   texture->loadFile("texture.jpg");
   pfDelete(img);
}

I would say that the texture is responsible of cleaning
up the old image, or do I miss something?

(I'm using Performer 3.0 on IRIX)

Rick.

------------------------------------------------------------------------------------------------
Rick van Haasen Philips Research
Laboratories Eindhoven
Building: WY8-48 Prof. Holstlaan 4
Phone: +31 40 2744357 5656 AA Eindhoven
Fax: +31 40 2744660 The Netherlands
E-mail: rick.van.haasen++at++philips.com
-------------------------------------------------------------------------------------------------


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Apr 14 2003 - 07:12:21 PDT

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