lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>BeginFrame(FB_PNG, "ball.png", 320, 240)
>
>Sphere {
>	radius = 1.0,
>	colour = Blue,
>	centre = Point { y = -3.0 }
>}
>
>EndFrame()

How about this instead:

Frame{whatever=FB_PNG, file="ball.png", width=320, height=240;
 Sphere {
	 radius = 1.0,
	 colour = Blue,
	 centre = Point { y = -3.0 }
 }
 -- plus whatever other objects.
}

Now, whatever Sphere or Union returns is not garbaged collected until Frame ends.

Or perhaps I'm missing something.
--lhf