lua-users home
lua-l archive

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


Hi folks, I was playing around with return hooks, and had a question regarding its execution.

The Lua manual states:

"The return hook is called when the interpreter returns from a function. The hook is called just before Lua leaves the function."

I noticed that return hooks are executed *after* locals have been cleared from the function stack, and before the function exits. Is there a reason why the locals are cleared before the return hook triggers? 

Tai