[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: GC Barriers
- From: Paige DePol <lual@...>
- Date: Tue, 12 Nov 2013 21:36:33 -0600
There is a comment above luaH_set that says:
"beware: when using this function you probably need to check a GC barrier and invalidate the TM cache"
I have a function which is called from luaV_execute, it creates a Table object, which may or may not have nested Table objects, which is eventually assigned to 'ra'.
As I am creating this table entirely during the call to my function from luaV_execute do I need to worry about creating GC barriers? The tables have no metamethods so I do not need to invalidate any caches.
I am setting the array part of the table every time and potentially the hash part if needed. These values are being set to Lua strings via luaS_new. Right now I do not have any barrier calls in place, I do have lua_assert defined and I do not get any assertions during the execution of my code, nor when the Lua state is torn down, which leads me to believe I probably don't need a barrier call.
I just thought I would double-check here to be sure! :)