mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-26 07:24:46 +00:00
Clean up image resources for the current window (#45969)
Closes https://github.com/zed-industries/zed/issues/35894 Trace: https://drive.google.com/file/d/1pXDFzOg4ZS4p2SX8fk9Cjnyy1Qd1Pkrx/view?usp=sharing [Relevant part](https://github.com/user-attachments/files/24412472/image_leak.txt) Release Notes: - Fixed a memory leak when opening images
This commit is contained in:
parent
e1a09e290c
commit
94faaebfec
1 changed files with 1 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ impl ImageView {
|
|||
cx.on_release_in(window, |this, window, cx| {
|
||||
let image_data = this.image_item.read(cx).image.clone();
|
||||
if let Some(image) = image_data.clone().get_render_image(window, cx) {
|
||||
cx.drop_image(image, None);
|
||||
cx.drop_image(image, Some(window));
|
||||
}
|
||||
image_data.remove_asset(cx);
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue