diff options
author | Dan Gudmundsson <[email protected]> | 2014-01-27 14:23:15 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2014-01-27 14:23:15 +0100 |
commit | 75bfbe5a61fa1a1dd204fdb21dc4bf7df8e8003d (patch) | |
tree | cedea2151cdc673bddfe541cf4956c5fd6b431ab /lib/wx/api_gen/wx_gen_cpp.erl | |
parent | c922ea6f82bb3d95d05d1f212b91e13f97e972b8 (diff) | |
parent | fd055cf43486358a413a1fa22f30f0aa711d25e1 (diff) | |
download | otp-75bfbe5a61fa1a1dd204fdb21dc4bf7df8e8003d.tar.gz otp-75bfbe5a61fa1a1dd204fdb21dc4bf7df8e8003d.tar.bz2 otp-75bfbe5a61fa1a1dd204fdb21dc4bf7df8e8003d.zip |
Merge branch 'dgud/wx/refactor-and-bugfixes/OTP-11586'
* dgud/wx/refactor-and-bugfixes/OTP-11586:
wx: Delay all deletes if recursed in event loop
wx: wx could hang if wxe_server died (or had died) when inside a callback
wx: Delay memory cleanup until safe
wx: Refactor C++ code
wx: Add init_dialog event
Update icons
wx: Update icons to plain old white ones
Diffstat (limited to 'lib/wx/api_gen/wx_gen_cpp.erl')
-rw-r--r-- | lib/wx/api_gen/wx_gen_cpp.erl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl index 6eed0668f6..5ac57e4929 100644 --- a/lib/wx/api_gen/wx_gen_cpp.erl +++ b/lib/wx/api_gen/wx_gen_cpp.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2013. All Rights Reserved. +%% Copyright Ericsson AB 2008-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -190,10 +190,14 @@ gen_funcs(Defs) -> %% w(" case WXE_REMOVE_PORT:~n", []), %% w(" { destroyMemEnv(Ecmd.port); } break;~n", []), w(" case DESTROY_OBJECT: {~n"), - w(" wxObject *This = (wxObject *) getPtr(bp,memenv); "), - w(" if(This) {"), - w(" ((WxeApp *) wxTheApp)->clearPtr((void *) This);~n"), - w(" delete This; }~n } break;~n"), + w(" wxObject *This = (wxObject *) getPtr(bp,memenv);~n"), + w(" if(This) {~n"), + w(" if(recurse_level > 1) {~n"), + w(" delayed_delete->Append(Ecmd.Save());~n"), + w(" } else {~n"), + w(" ((WxeApp *) wxTheApp)->clearPtr((void *) This);~n"), + w(" delete This; }~n"), + w(" } } break;~n"), w(" case WXE_REGISTER_OBJECT: {~n" " registerPid(bp, Ecmd.caller, memenv);~n" " rt.addAtom(\"ok\");~n" |