Memory Leak

Started by
0 comments, last by Balon 24 years, 5 months ago
Would anyone help me to clear the memory leak by Power Render 3.0

I have already use PR_LoadPro & PR_FreeObject in pair. But there is still something not deallocated. The memory manager report me , block not freed in "Prlfile.c Line 820".

Would anyone who have 3.0 source code , help me to find what this lines about ?

[This message has been edited by Balon (edited November 19, 1999).]

C|O-O|D
Advertisement
It is camera keys for animation.
To free this:
PR_CAMERA *cam;

cam = PR_GetFirstCamera();
if (cam != NULL)
{
if (cam->cam_keys != NULL)
PR_free (cam->cam_keys);
PR_DeleteCamera (cam);
}

I missed freeing the keys in PR_DeleteCamera. Also note if you are loading more than one camera from .PRO files, you will need to loop until PR_GetFirstCamera returns NULL.

Author of Power Render (http:/www.powerrender.com)

This topic is closed to new replies.

Advertisement