MCPcopy Create free account
hub / github.com/Snapchat/Valdi / freeByteBuffer

Function freeByteBuffer

valdi/src/valdi/quickjs/QuickJSJavaScriptContext.cpp:58–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void freeByteBuffer(JSRuntime* rt, void* opaque, void* /*ptr*/) {
59 auto* byteBuffer = dynamic_cast<Valdi::ByteBuffer*>(reinterpret_cast<Valdi::RefCountable*>(opaque));
60
61 JS_DecreaseExternallyAllocatedMemory(rt, byteBuffer->capacity());
62 Valdi::unsafeBridgeRelease(opaque);
63}
64
65static void handleRejectedPromise(
66 JSContext* ctx, JSValueConst promise, JSValueConst reason, JS_BOOL is_handled, void* opaque) {

Callers

nothing calls this directly

Calls 2

unsafeBridgeReleaseFunction · 0.85
capacityMethod · 0.45

Tested by

no test coverage detected