]> git.saurik.com Git - wxWidgets.git/commitdiff
applying patch 1622389, fixing two memory leaks
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 27 Dec 2006 15:49:26 +0000 (15:49 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 27 Dec 2006 15:49:26 +0000 (15:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/graphics.cpp

index a36821fc53fb3d7ae0a215f9a706c83fa45bc4cb..0a226352027732ba66748fa6b8a67b6b653e6969 100755 (executable)
@@ -1836,6 +1836,9 @@ void wxMacCoreGraphicsContext::GetTextExtent( const wxString &str, wxDouble *wid
         *width = FixedToInt(textAfter - textBefore);
 
     ::ATSUDisposeTextLayout(atsuLayout);
+#if SIZEOF_WCHAR_T == 4
+    free( ubuf ) ;
+#endif
 }
 
 void wxMacCoreGraphicsContext::GetPartialTextExtents(const wxString& text, wxArrayDouble& widths) const
@@ -1894,6 +1897,9 @@ void wxMacCoreGraphicsContext::GetPartialTextExtents(const wxString& text, wxArr
     }
 
     ::ATSUDisposeTextLayout(atsuLayout);
+#if SIZEOF_WCHAR_T == 4
+    free( ubuf ) ;
+#endif
 }
 
 void * wxMacCoreGraphicsContext::GetNativeContext()