memory leak or not?

Blitz3D Forums/Blitz3D Programming/memory leak or not?

Function CreateDisplay()
Graphics3D 640,480,16,1
camera=CreateCamera()
End Function

If I call this ten times, will there be a memory leak? think carefully before replying :)

I would say NO.

well, you would create 10 cameras and nine of those cameras have no pointer to it. except, of course, if graphics3d clears all the entities.

I would hope to say "NO", but I can only say "NOT SURE".

I imagine Mark would clean up before/during the Graphics3D command, but only he can say for sure.

I would say no, but to be sure, I would whack in an ENDGRAPHICS command at the end of the function.

"well, you would create 10 cameras and nine of those cameras have no pointer to it. except, of course, if graphics3d clears all the entities. "

i think that only clears all textures but not 3d stuff like meshes and yeah you would have 9 cameras without pointers like mentioned.