MCPcopy Create free account
hub / github.com/GrowthEase/GameSentry / nativeIterator

Function nativeIterator

lib/component/utils/utils.js:8–14  ·  view source on GitHub ↗

@internal

(holder, nativeFunction, Class)

Source from the content-addressed store, hash-verified

6
7/** @internal */
8function* nativeIterator(holder, nativeFunction, Class) {
9 const iterator = Memory.alloc(Process.pointerSize);
10 let handle;
11 while (!(handle = nativeFunction(holder, iterator)).isNull()) {
12 yield new Class(handle);
13 }
14}
15
16exports.nativeIterator = nativeIterator;
17

Callers

nothing calls this directly

Calls 2

isNullMethod · 0.80
allocMethod · 0.45

Tested by

no test coverage detected