From b43a0635a274bcfb7076dcb204b7748a9337d79e Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 19 Aug 2008 04:50:45 +0000 Subject: [PATCH] fixing leak in the 'old' non-graphics code, thanks to Kevin git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@55129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/dccg.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mac/carbon/dccg.cpp b/src/mac/carbon/dccg.cpp index 30e3ea99e3..430cd7d67f 100755 --- a/src/mac/carbon/dccg.cpp +++ b/src/mac/carbon/dccg.cpp @@ -1066,6 +1066,9 @@ void wxMacCGContext::GetTextExtent( const wxString &str, wxCoord *width, wxCoord *width = FixedToInt(textAfter - textBefore) ; ::ATSUDisposeTextLayout(atsuLayout); +#if SIZEOF_WCHAR_T == 4 + free( ubuf ) ; +#endif } void wxMacCGContext::GetPartialTextExtents(const wxString& text, wxArrayInt& widths) const @@ -1123,6 +1126,9 @@ void wxMacCGContext::GetPartialTextExtents(const wxString& text, wxArrayInt& wid } ::ATSUDisposeTextLayout(atsuLayout); +#if SIZEOF_WCHAR_T == 4 + free( ubuf ) ; +#endif } void wxMacCGContext::SetFont( const wxFont &font )