aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/examples/demo
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2016-05-27 11:53:13 +0200
committerDan Gudmundsson <[email protected]>2016-05-30 13:17:40 +0200
commitb304be8094f283001d6dfbafab31ead37c585869 (patch)
tree355c614d17c6974cec335b9e76728574449ae0bb /lib/wx/examples/demo
parentd5bacdbe0ff1a4327e5e502a0b8cfdddf76e5d86 (diff)
downloadotp-b304be8094f283001d6dfbafab31ead37c585869.tar.gz
otp-b304be8094f283001d6dfbafab31ead37c585869.tar.bz2
otp-b304be8094f283001d6dfbafab31ead37c585869.zip
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.
Diffstat (limited to 'lib/wx/examples/demo')
-rw-r--r--lib/wx/examples/demo/ex_graphicsContext.erl2
1 files changed, 2 insertions, 0 deletions
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",