Skip to content

Fix GPU memory leak in WebGpuViewer when jumping pages - #3872

Open
Danidukiyu wants to merge 1 commit into
mihonapp:mainfrom
Danidukiyu:fix/webgpu-memory-leak
Open

Fix GPU memory leak in WebGpuViewer when jumping pages#3872
Danidukiyu wants to merge 1 commit into
mihonapp:mainfrom
Danidukiyu:fix/webgpu-memory-leak

Conversation

@Danidukiyu

Copy link
Copy Markdown

Fixes #3863

Summary

When using the page navigator slider to rapidly jump through a chapter on the new WebGpu renderer, pages that were queued and subsequently evicted from the WebGpuViewer cache before they finished decoding were leaking their GPU textures.

This PR adds a missing imagePage.cleanup() call in decodeReaderPage to ensure that if a page finishes decoding but has already been evicted from the cache, the newly allocated texture is properly destroyed.

  • Tested: Yes (Compiled and verified on physical hardware to confirm the massive GC pressure, freezing, and OOM crash are resolved).
  • Self-Reviewed: Yes.
  • Visual Changes: No UI changes, strictly memory management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash when jumping between pages on new renderer

1 participant