lua-users home
lua-l archive

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


The code below runs just fine on both of these online Lua websites.
local tab = {} 
tab[938388893] = "hi" 
tab[987383332] = "Hello"
for k,v in pairs(tab) do
 print(k) 
print (v) 
end

But when I try it using the Sol2 library (embedded in C++) it eats all my memory. 
It seems to create a giant table with the array part full of mostly empty values and just those two strings in their corresponding array slots.

Is it a Sol2 issue or a C Lua binding issue? Anybody know?