egui/crates/egui_extras
Vanadiae 8333615072
Fix memory leak when `forget_image` is called while loading (#7380)
This is the same issue that was fixed for the http bytes loader in
239ade9a59

* [x] I have followed the instructions in the PR template

----------------

Funnily, [this
comment](https://github.com/emilk/egui/issues/3747#issuecomment-1872192997)
describes exactly how I encountered this issue:

> That assert is wrong if something calls forget between the start of
the request and the end of it.

I'm displaying lots of images in a scrolling grid (20 or so visible at a
time). It seems like image textures are never freed up automatically so
it stacks up a lot meaning I have to unload the image textures manually
with `egui::Context::forget_image()` in each `eframe::App::update()`
call for the images that are no longer shown when scrolling.

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2025-08-05 14:41:32 +02:00
..
src Fix memory leak when `forget_image` is called while loading (#7380) 2025-08-05 14:41:32 +02:00
CHANGELOG.md Release 0.32.0 - Atoms, popups, and better SVG support (#7329) 2025-07-10 16:58:39 +02:00
Cargo.toml Include test windows in `egui_demo_lib` snapshot tests (#7070) 2025-05-21 17:44:27 +02:00
README.md Update `image` crate to 0.25 (#4160) 2024-05-13 13:35:15 +02:00

README.md

egui_extras

Latest version Documentation unsafe forbidden MIT Apache

This is a crate that adds some features on top top of egui. This crate is for experimental features, and features that require big dependencies that do not belong in egui.

Images

One thing egui_extras is commonly used for is to install image loaders for egui:

egui_extras = { version = "*", features = ["all_loaders"] }
image = { version = "0.25", features = ["jpeg", "png"] } # Add the types you want support for
egui_extras::install_image_loaders(egui_ctx);