-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Description
I noticed that new LuaTable(0, 0) still generates an array with 8 entries.
Is there a reason for doing this in the LuaTable ctor?
public LuaTable(int arrayCapacity, int dictionaryCapacity)
{
array = new LuaValue[Math.Max(arrayCapacity, 8)];
I thought I'll report it because I'm not sure whether this is intentional because that amounts to roughly 100 bytes overhead for an empty LuaTable.
I noticed because I have a LuaTable Inspector drawer for Unity and it just happened to add eight "null" entries to the previously empty Array:
For this I can easily work around it by not serializing "nil" values rather than defaulting them to 0.
Metadata
Metadata
Assignees
Labels
No labels
