1.0.4 • Published 1 year ago

csl-runtime-gc v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

csl-runtime-gc

This is a small library that provides a wrapper for managing garbage collection for cardano-serialization-library. It does this by using a FinalizationRegistry object to keep track of objects that are no longer in use, and calling the free() method on them when they are finalized.

Example usage:

const csl = require("@emurgo/cardano-serialization-lib-browser");
const wrappedCsl = require('cs-runtime-gc')(csl)

function fixture() {
  const arr = new Uint8Array(Array(10000000).fill(0));
  const pd = lib.PlutusData.new_bytes(arr);
}

setInterval(() => {
  for (let i = 0; i < 10; i++) {
    fixture()
  }
}, 500) // gc will trigger proxies and underlying pointers
1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago