]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix a very annoying autorelease pool memory leak.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 4 Oct 2013 09:39:24 +0000 (02:39 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 4 Oct 2013 09:39:24 +0000 (02:39 -0700)
src/osx/cocoa/textctrl.mm

index 6c38fdf74f0106305bf032fc704a123ed315c4f8..7ec0ff8bca710cf688e151af1bf755c56ed8e8a3 100644 (file)
@@ -49,6 +49,8 @@
 #include "wx/osx/private.h"
 #include "wx/osx/cocoa/private/textimpl.h"
 
+#include "wx/cocoa/autorelease.h"
+
 @interface NSView(EditableView)
 - (BOOL)isEditable;
 - (void)setEditable:(BOOL)flag;
@@ -797,6 +799,7 @@ wxNSTextFieldControl::~wxNSTextFieldControl()
 
 wxString wxNSTextFieldControl::GetStringValue() const
 {
+    wxAutoNSAutoreleasePool pool;
     return wxCFStringRef::AsString([m_textField stringValue], m_wxPeer->GetFont().GetEncoding());
 }