mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
Fix WGPU implementation memory leak
Now unused surfaces will be cleared
This commit is contained in:
@@ -615,6 +615,11 @@ impl Painter {
|
||||
screenshot
|
||||
}
|
||||
|
||||
pub fn clean_surfaces(&mut self, avalibile_viewports: Vec<u64>) {
|
||||
self.surfaces
|
||||
.retain(|id, _| avalibile_viewports.contains(id))
|
||||
}
|
||||
|
||||
#[allow(clippy::unused_self)]
|
||||
pub fn destroy(&mut self) {
|
||||
// TODO(emilk): something here?
|
||||
|
||||
Reference in New Issue
Block a user