We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9a4830 commit 3d9374eCopy full SHA for 3d9374e
1 file changed
src/core/icc_colorspace.js
@@ -48,9 +48,7 @@ class IccColorSpace extends ColorSpace {
48
49
static #wasmUrl = null;
50
51
- static #finalizer = new FinalizationRegistry(transformer => {
52
- qcms_drop_transformer(transformer);
53
- });
+ static #finalizer = null;
54
55
constructor(iccProfile, name, numComps) {
56
if (!IccColorSpace.isUsable) {
@@ -100,6 +98,9 @@ class IccColorSpace extends ColorSpace {
100
98
if (!this.#transformer) {
101
99
throw new Error("Failed to create ICC color space");
102
}
+ IccColorSpace.#finalizer ||= new FinalizationRegistry(transformer => {
+ qcms_drop_transformer(transformer);
103
+ });
104
IccColorSpace.#finalizer.register(this, this.#transformer);
105
106
0 commit comments