mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-07-29 18:37:20 +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 { clearPatternCaches } from "./pattern.js";
|
||||||
import { clearPrimitiveCaches } from "./primitives.js";
|
import { clearPrimitiveCaches } from "./primitives.js";
|
||||||
import { clearUnicodeCaches } from "./unicode.js";
|
import { clearUnicodeCaches } from "./unicode.js";
|
||||||
|
import { JBig2CCITTFaxWasmImage } from "./jbig2_ccittFax_wasm.js";
|
||||||
import { JpxImage } from "./jpx.js";
|
import { JpxImage } from "./jpx.js";
|
||||||
|
|
||||||
function clearGlobalCaches() {
|
function clearGlobalCaches() {
|
||||||
@ -23,8 +24,9 @@ function clearGlobalCaches() {
|
|||||||
clearPrimitiveCaches();
|
clearPrimitiveCaches();
|
||||||
clearUnicodeCaches();
|
clearUnicodeCaches();
|
||||||
|
|
||||||
// Remove the global `JpxImage` instance, since it may hold a reference to
|
// Remove the global `JBig2CCITTFaxWasmImage`/`JpxImage` instances,
|
||||||
// the WebAssembly module.
|
// since they may hold references to the WebAssembly modules.
|
||||||
|
JBig2CCITTFaxWasmImage.cleanup();
|
||||||
JpxImage.cleanup();
|
JpxImage.cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user