diff options
author | Dan Gudmundsson <[email protected]> | 2013-12-20 09:20:22 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2014-01-14 13:26:53 +0100 |
commit | 74f6d6d74f7a3be5aece37a0b419e40d96e036d4 (patch) | |
tree | 73ffc54f3b8b9b827f6f2a9aedd46b566dce7ffa /lib/wx/c_src/gen/wxe_funcs.cpp | |
parent | 3f9b80b1e635f3b5f39bd7380b3bd777ebd98338 (diff) | |
download | otp-74f6d6d74f7a3be5aece37a0b419e40d96e036d4.tar.gz otp-74f6d6d74f7a3be5aece37a0b419e40d96e036d4.tar.bz2 otp-74f6d6d74f7a3be5aece37a0b419e40d96e036d4.zip |
wx: Fix crash when garbage collect event handlers (debugger caused seg fault)
wxStyledTextCtrl had no wrapper class so, because it was not detected
that it had virtual destructors, thus references to it was not cleaned
up on destruction. When a process dies and wx cleans up the event handlers
access was made to the deleted object and caused a seg fault.
Added a testcase which I thought could provoke the bug but didn't.
Diffstat (limited to 'lib/wx/c_src/gen/wxe_funcs.cpp')
-rw-r--r-- | lib/wx/c_src/gen/wxe_funcs.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/wx/c_src/gen/wxe_funcs.cpp b/lib/wx/c_src/gen/wxe_funcs.cpp index b5fbac3fe0..329af36f4d 100644 --- a/lib/wx/c_src/gen/wxe_funcs.cpp +++ b/lib/wx/c_src/gen/wxe_funcs.cpp @@ -26953,14 +26953,14 @@ case wxStyledTextCtrl_new_2: { // wxStyledTextCtrl::wxStyledTextCtrl style = (long)*(int *) bp; bp += 4; } break; }}; - wxStyledTextCtrl * Result = new wxStyledTextCtrl(parent,id,pos,size,style); - /* Possible memory leak here, class is missing virt dest */ + wxStyledTextCtrl * Result = new EwxStyledTextCtrl(parent,id,pos,size,style); + newPtr((void *) Result, 0, memenv); rt.addRef(getRef((void *)Result,memenv), "wxStyledTextCtrl"); break; } case wxStyledTextCtrl_new_0: { // wxStyledTextCtrl::wxStyledTextCtrl - wxStyledTextCtrl * Result = new wxStyledTextCtrl(); - /* Possible memory leak here, class is missing virt dest */ + wxStyledTextCtrl * Result = new EwxStyledTextCtrl(); + newPtr((void *) Result, 0, memenv); rt.addRef(getRef((void *)Result,memenv), "wxStyledTextCtrl"); break; } |