Why must the glow painter be destroyed manually #1386
Replies: 3 comments 1 reply
-
The problem is that |
Beta Was this translation helpful? Give feedback.
-
Right, I'm using a How shall I destroy a glow painter in this case? |
Beta Was this translation helpful? Give feedback.
-
I'm also interested in the solution. @emilk, could you shed some light on this issue? |
Beta Was this translation helpful? Give feedback.
-
The following message is printed by tracing after the egui application panics:
Tracking down this message it leads me to the
egui_glow
painter. In the documentation comment, it notes:egui/egui_glow/src/painter.rs
Lines 27 to 29 in 465c961
I was wondering what the rationale behind not just using a
Drop
implementation to clean up the painter resources. There even is aDrop
handler that ensures the programmer called this destroy function.egui/egui_glow/src/painter.rs
Lines 630 to 638 in 465c961
To me, it would make more sense to call
Painter::destroy
in theDrop
implementation. So that the painter is always cleaned up without the programmer needing to manually callPainter::destroy
, and it woulddestroy
the painter in the case of a panicBeta Was this translation helpful? Give feedback.
All reactions