MCPcopy Create free account
hub / github.com/cocos/cocos-engine / ArrayBuffer

Method ArrayBuffer

native/cocos/core/ArrayBuffer.cpp:29–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27namespace cc {
28
29ArrayBuffer::ArrayBuffer(uint32_t length) : _byteLength{length} {
30 _jsArrayBuffer = se::Object::createArrayBufferObject(nullptr, length);
31 _jsArrayBuffer->root();
32 _jsArrayBuffer->getArrayBufferData(static_cast<uint8_t **>(&_data), nullptr);
33 memset(_data, 0x00, _byteLength);
34}
35
36ArrayBuffer::ArrayBuffer(const uint8_t *data, uint32_t length) {
37 reset(data, length);

Callers

nothing calls this directly

Calls 3

resetFunction · 0.50
rootMethod · 0.45
getArrayBufferDataMethod · 0.45

Tested by

no test coverage detected