MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / ArrayBase

Method ArrayBase

src/Array.cpp:96–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94 { return Array<Dynamic>(new Array_obj<Dynamic>(inSize,inReserve)); }
95
96ArrayBase::ArrayBase(int inSize,int inReserve,int inElementSize,bool inAtomic)
97{
98 length = inSize;
99 int alloc = inSize < inReserve ? inReserve : inSize;
100 if (alloc)
101 {
102 mBase = (char *)hx::InternalNew(alloc * inElementSize,false);
103 HX_OBJ_WB_GET(this,mBase);
104#ifdef HXCPP_TELEMETRY
105 __hxt_new_array(mBase, alloc * inElementSize);
106#endif
107 }
108 else
109 mBase = 0;
110 mAlloc = alloc;
111 mArrayConvertId = inAtomic ? inElementSize :
112 inElementSize==sizeof(String) ? aciStringArray : aciObjectArray;
113}
114
115
116

Callers

nothing calls this directly

Calls 2

InternalNewFunction · 0.85
__hxt_new_arrayFunction · 0.50

Tested by

no test coverage detected