]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/textctrl.cpp
shutdown sequence routing to EndSession calls
[wxWidgets.git] / src / msw / textctrl.cpp
index 8ffbfce0c1799c2cdf93365d1e8942f6541b10fb..d5e40992c3183f0764356e7e6cda7de356993b6d 100644 (file)
@@ -1038,10 +1038,6 @@ wxTextCtrl::StreamIn(const wxString& value,
         wxLogLastError(wxT("EM_STREAMIN"));
     }
 
-#if !wxUSE_WCHAR_T
-    free(wchBuf);
-#endif // !wxUSE_WCHAR_T
-
     return true;
 }
 
@@ -1054,13 +1050,8 @@ wxTextCtrl::StreamOut(wxFontEncoding encoding, bool selectionOnly) const
 
     const int len = GetWindowTextLength(GetHwnd());
 
-#if wxUSE_WCHAR_T
     wxWCharBuffer wchBuf(len);
     wchar_t *wpc = wchBuf.data();
-#else
-    wchar_t *wchBuf = (wchar_t *)malloc((len + 1)*sizeof(wchar_t));
-    wchar_t *wpc = wchBuf;
-#endif
 
     wxStreamOutData data;
     data.wpc = wpc;
@@ -1100,10 +1091,6 @@ wxTextCtrl::StreamOut(wxFontEncoding encoding, bool selectionOnly) const
         }
     }
 
-#if !wxUSE_WCHAR_T
-    free(wchBuf);
-#endif // !wxUSE_WCHAR_T
-
     return out;
 }