Debian Codegraph @

.cargo/vendor/wasm-bindgen/tests/wasm/owned.js

raw
1 const wasm = require("wasm-bindgen-test.js");
2
3 exports.create_garbage = async function () {
4 for (let i = 0; i < 100; i++) {
5 new wasm.OwnedValue(1).add(new wasm.OwnedValue(2)).n();
6 }
7
8 if ("gc" in global) {
9 global.gc();
10 } else {
11 console.warn("test runner doesn't expose GC function");
12 }
13 };