lua-users home
lua-l archive

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


> How many stack slots do I have available when __close is called?

In any realistic use, the code needs to call something to "acquire a
resource" in an expression:

  local <toclose> x = <acquire a resource>

So, if that call worked, there is at least one stack slot available
to release that resource.

Of course, we can come up with some weird (at least in my view)
code like that, to prove me wrong:

  -- 'f' is a resource acquired in some different scope
  local <toclose> x = f

We will try to improve on that.

-- Roberto