summaryrefslogtreecommitdiffstats
path: root/examples/integration_opengl/src/main.rs
diff options
context:
space:
mode:
authorLibravatar Fey Naomi Schrewe <fey@posteo.eu>2022-01-02 19:21:52 +0100
committerLibravatar Fey Naomi Schrewe <fey@posteo.eu>2022-01-02 19:21:52 +0100
commitbc26b52044e41f627addd337a65fe5f9838ff09d (patch)
tree5040a91d2ff9651cf369fd6caed1497f523f6432 /examples/integration_opengl/src/main.rs
parent5466d6a11d0a4bee01e954b7c727b3fd67cea02a (diff)
downloadiced-bc26b52044e41f627addd337a65fe5f9838ff09d.tar.gz
iced-bc26b52044e41f627addd337a65fe5f9838ff09d.tar.bz2
iced-bc26b52044e41f627addd337a65fe5f9838ff09d.zip
Fix memory leak in opengl integration example
Diffstat (limited to 'examples/integration_opengl/src/main.rs')
-rw-r--r--examples/integration_opengl/src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/integration_opengl/src/main.rs b/examples/integration_opengl/src/main.rs
index 3b63f22e..551aba67 100644
--- a/examples/integration_opengl/src/main.rs
+++ b/examples/integration_opengl/src/main.rs
@@ -73,8 +73,9 @@ pub fn main() {
);
let mut resized = false;
+ let scene = Scene::new(&gl, &shader_version);
+
event_loop.run(move |event, _, control_flow| {
- let scene = Scene::new(&gl, &shader_version);
*control_flow = ControlFlow::Wait;
match event {