From 8e7a3ecb9c1b9f5653e56301f51dfa39acca6bc6 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 4 Oct 2013 02:39:24 -0700 Subject: [PATCH] Fix a very annoying autorelease pool memory leak. --- src/osx/cocoa/textctrl.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/osx/cocoa/textctrl.mm b/src/osx/cocoa/textctrl.mm index 6c38fdf74f..7ec0ff8bca 100644 --- a/src/osx/cocoa/textctrl.mm +++ b/src/osx/cocoa/textctrl.mm @@ -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()); } -- 2.45.2