[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Loading chunks
- From: "Alex Queiroz" <asandroq@...>
- Date: Mon, 20 Feb 2006 09:35:11 -0300
On 2/20/06, Rob Shaw <firstname.lastname@example.org> wrote:
> this wasn't instantly obvious to me either. could I ask this-
> say you just do
> > loadfile 'test.lua'
> the stuff is sitting on the stack, but you haven't named it.
> is there any way in lua to execute the top of the stack, without the label?
> what happens to it, does it get over-written by the next call to loadfile(),
> or does it get garbage-collected?
You can write:
If you don't assign it or don't execute it, it'll be garbage collected.