wrvo (WRVO++at++chevron.com)
Thu, 19 Feb 1998 15:27:19 -0800
Then main problem that I'm having is that the texture is not freed. The
statement at line 11 is true, showing that the reference count on the
texture is 1, then unrefDelete should delete the texture, but the return
value from the call is false, indicating that it did not delete it. The
reference count printed in line 14 is still 1.
Under what conditions does unrefDelete not actually delete the memory
(besides the obvious when the reference count is greater than 0? The
destructor in TextureFile is virtual but it is not being called.
Any help on this would be greatly appreciated.
Thanks, Bill Volz
1 void DataCache1D::cleanUp(void)
2 {
3 int draw_buf = (app_buf + 1) % nbuf;
4 short *code = (short*) code_buf->get(draw_buf);
5 pfList *files = (pfList*) files_buf->get(draw_buf);
6 TextureFile *c;
7 for(int i = 0;i < nx; i++) {
8 if(code[i] <= 1) {
9 c = (TextureFile *) files->get(i);
10 if(c) {
11 if(c->ref() == 1) cerr << "deleting i = " <<
i << endl;
12 if(c->isLoaded()) c->idle();
13 if(!c->unrefDelete()) cerr << "did
not delete " << i << endl;
14 cerr << "refcount is now " <<
c->ref() << endl;
15 files->set(i,0);
16 }
17 }
18 }
19 }
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:56:48 PDT