Skip to content

Commit 29362e6

Browse files
committed
Remove the JBig2CCITTFaxWasmImage instance when running clean-up
This follows the same pattern as the existing handling for the `JpxImage` instance.
1 parent a4fcd83 commit 29362e6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/core/cleanup_helper.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@
1616
import { clearPatternCaches } from "./pattern.js";
1717
import { clearPrimitiveCaches } from "./primitives.js";
1818
import { clearUnicodeCaches } from "./unicode.js";
19+
import { JBig2CCITTFaxWasmImage } from "./jbig2_ccittFax_wasm.js";
1920
import { JpxImage } from "./jpx.js";
2021

2122
function clearGlobalCaches() {
2223
clearPatternCaches();
2324
clearPrimitiveCaches();
2425
clearUnicodeCaches();
2526

26-
// Remove the global `JpxImage` instance, since it may hold a reference to
27-
// the WebAssembly module.
27+
// Remove the global `JBig2CCITTFaxWasmImage`/`JpxImage` instances,
28+
// since they may hold references to the WebAssembly modules.
29+
JBig2CCITTFaxWasmImage.cleanup();
2830
JpxImage.cleanup();
2931
}
3032

0 commit comments

Comments
 (0)