mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-06-22 16:05:56 +02:00
Remove the JBig2CCITTFaxWasmImage instance when running clean-up
This follows the same pattern as the existing handling for the `JpxImage` instance.
This commit is contained in:
parent
a4fcd830cc
commit
29362e6afb
@ -16,6 +16,7 @@
|
||||
import { clearPatternCaches } from "./pattern.js";
|
||||
import { clearPrimitiveCaches } from "./primitives.js";
|
||||
import { clearUnicodeCaches } from "./unicode.js";
|
||||
import { JBig2CCITTFaxWasmImage } from "./jbig2_ccittFax_wasm.js";
|
||||
import { JpxImage } from "./jpx.js";
|
||||
|
||||
function clearGlobalCaches() {
|
||||
@ -23,8 +24,9 @@ function clearGlobalCaches() {
|
||||
clearPrimitiveCaches();
|
||||
clearUnicodeCaches();
|
||||
|
||||
// Remove the global `JpxImage` instance, since it may hold a reference to
|
||||
// the WebAssembly module.
|
||||
// Remove the global `JBig2CCITTFaxWasmImage`/`JpxImage` instances,
|
||||
// since they may hold references to the WebAssembly modules.
|
||||
JBig2CCITTFaxWasmImage.cleanup();
|
||||
JpxImage.cleanup();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user