Skip to content

Commit 42b582c

Browse files
committed
[#51] add cache construction in the init method
1 parent b71f7c4 commit 42b582c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Unity/Assets/NativeScript/Bindings.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ public static class ObjectStore
3838
public static void Init(int maxObjects)
3939
{
4040
ObjectStore.maxObjects = maxObjects;
41+
handleLookupByHash = new Dictionary<uint, int> ();
42+
hashLookupByHandle = new Dictionary<int, uint> ();
43+
freeHandleStack = new Stack<int> ();
4144

4245
// Initialize the objects as all null plus room for the
4346
// first to always be null.

0 commit comments

Comments
 (0)