MCPcopy Create free account
hub / github.com/Tencent/xLua / Add

Method Add

Assets/XLua/Src/ObjectPool.cs:65–88  ·  view source on GitHub ↗
(object obj)

Source from the content-addressed store, hash-verified

63 }
64
65 public int Add(object obj)
66 {
67 int index = LIST_END;
68
69 if (freelist != LIST_END)
70 {
71 index = freelist;
72 list[index].obj = obj;
73 freelist = list[index].next;
74 list[index].next = ALLOCED;
75 }
76 else
77 {
78 if (count == list.Length)
79 {
80 extend_capacity();
81 }
82 index = count;
83 list[index] = new Slot(ALLOCED, obj);
84 count = index + 1;
85 }
86
87 return index;
88 }
89
90 public bool TryGetValue(int index, out object obj)
91 {

Callers 15

InitMethod · 0.45
_GenMethodWrapMethod · 0.45
SetGenInterfacesMethod · 0.45
addToBlackListMethod · 0.45
EmitTypeWrapMethod · 0.45
TryDelayWrapLoaderMethod · 0.45
addAssemblieByNameMethod · 0.45
ObjectTranslatorMethod · 0.45
initCSharpCallLuaMethod · 0.45
getDelegateMethod · 0.45
CreateInterfaceBridgeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected