From b304be8094f283001d6dfbafab31ead37c585869 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Fri, 27 May 2016 11:53:13 +0200 Subject: wx: Fix occasional seq fault after appliction stops There seems to be a timeing dependent double delete when doing reference cleanup after wx:destroy(). wxGraphicsObjects can thus not be free'ed by wx in the cleanup phase. A guess is that the underlying rendering context deletes all graphics objects without careeing about wxWidgets reference counting. --- lib/wx/examples/demo/ex_graphicsContext.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/wx/examples') diff --git a/lib/wx/examples/demo/ex_graphicsContext.erl b/lib/wx/examples/demo/ex_graphicsContext.erl index d883ddfc5c..1193578037 100644 --- a/lib/wx/examples/demo/ex_graphicsContext.erl +++ b/lib/wx/examples/demo/ex_graphicsContext.erl @@ -135,6 +135,8 @@ draw(Win, Pen, Brush, Font) -> wxGraphicsContext:drawPath(Canvas, Path) end, wx:foreach(F, lists:seq(1,10)), + wxGraphicsObject:destroy(Path), + wxGraphicsObject:destroy(Canvas), ok catch _:{not_supported, _} -> Err = "wxGraphicsContext not available in this build of wxwidgets", -- cgit v1.2.3