B. Jacob
06-11-2001, 11:28 PM
I am using GLUT and auxDIBImageLoadA and I am thinking on some problems about memory management :
1. I use exit(0) to exit form glutMainLoop. But does it really delete the Rendering Context ? Should I better use CloseWindow ?
2. I initialize my texture by :
AUX_RGBImageRec *texture = (AUX_RGBImageRec *) NULL;
... ....
texture = auxDIBImageLoadA ("filename.bmp");
Before calling exit (0), I delete my textures with :
LocalFree(texture);
Is this enough ? Should I better free texture -> data ? And if the texture was stored in the accelerator card 's memory,
will it really be deleted ?
Please help !
1. I use exit(0) to exit form glutMainLoop. But does it really delete the Rendering Context ? Should I better use CloseWindow ?
2. I initialize my texture by :
AUX_RGBImageRec *texture = (AUX_RGBImageRec *) NULL;
... ....
texture = auxDIBImageLoadA ("filename.bmp");
Before calling exit (0), I delete my textures with :
LocalFree(texture);
Is this enough ? Should I better free texture -> data ? And if the texture was stored in the accelerator card 's memory,
will it really be deleted ?
Please help !