]> git.saurik.com Git - wxWidgets.git/commitdiff
revert memory leak fix, it causes crash
authorPaul Cornett <paulcor@bullseye.com>
Thu, 2 Nov 2006 18:37:23 +0000 (18:37 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Thu, 2 Nov 2006 18:37:23 +0000 (18:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/textctrl.cpp

index 08bb79660ba547a62cad2a3653ecf2aec516d968..7443a8f3c9ab5b145a8a028b69ae331f2d2bd8d2 100644 (file)
@@ -1852,8 +1852,8 @@ void wxTextCtrl::Freeze()
             g_object_ref(m_buffer);
             GtkTextBuffer* buf_new = gtk_text_buffer_new(NULL);
             gtk_text_view_set_buffer(GTK_TEXT_VIEW(m_text), buf_new);
-            // gtk_text_view_set_buffer adds its own reference
-            g_object_unref(buf_new);
+            // FIXME: this leaks the new buffer, since gtk_text_view_set_buffer
+            // adds its own reference, but unrefing it here can cause a crash later
         }
     }
 }