memory leak or not?

Blitz3D Forums/Blitz3D Programming/memory leak or not?

Rob(Posted 2003) [#1]
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 :)


Bouncer(Posted 2003) [#2]
I would say NO.


koekjesbaby(Posted 2003) [#3]
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.


Beaker(Posted 2003) [#4]
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.


Ricky Smith(Posted 2003) [#5]
I would say no, but to be sure, I would whack in an ENDGRAPHICS command at the end of the function.


(tu) sinu(Posted 2003) [#6]
"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.