]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/graphics.cpp
applying patch 1622389, fixing two memory leaks
[wxWidgets.git] / 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()