lua-users home
lua-l archive

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


Roberto,

Thank you for your feedback and assistance, it is very appreciated!

I did not consider the need to anchor my table, so thank you for alerting me to that necessity! :)

As I am returning the table via 'ra' I am just anchoring it there upon creating the first table. Am I correct in assuming that once this table is anchored in the stack that any tables added to it are also safe from emergency garbage collection?

~pmd~



On Nov 13, 2013, at 5:28 AM, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:

> If your entire operation never calls the garbage collector (e.g.,
> 'luaC_checkGC'), then you do not need barriers. The tables you are
> creating are all white (not visited yet); the problem is a black object
> refering to a white one. If you are using Lua 5.2, remember also that
> you have to anchor your objects while creating them, or an emergency
> collection can collect them.
> 
> -- Roberto