summaryrefslogtreecommitdiff
path: root/alf/alfcombobox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alf/alfcombobox.cpp')
-rw-r--r--alf/alfcombobox.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/alf/alfcombobox.cpp b/alf/alfcombobox.cpp
index 409d64f..df88730 100644
--- a/alf/alfcombobox.cpp
+++ b/alf/alfcombobox.cpp
@@ -370,16 +370,16 @@ ALF_ComboBoxSetCurrentIndex(HWND combo, int index)
SendMessage(combo, CB_SETCURSEL, (WPARAM)index, 0);
}
-TCHAR * // free with HeapFree
+TCHAR * // free with ALF_Free
ALF_ComboBoxStringForIndex(HWND combo, int index)
{
int len = (int)SendMessage(combo, CB_GETLBTEXTLEN, (WPARAM)index, 0);
if (len > 0) {
- TCHAR* buf = (TCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY|HEAP_GENERATE_EXCEPTIONS, (len + 1)*sizeof(WCHAR));
+ TCHAR* buf = ALF_New(TCHAR, len + 1);
if (SendMessage(combo, CB_GETLBTEXT, (WPARAM)index, (LPARAM)buf)) {
return buf;
} else {
- HeapFree(GetProcessHeap(), 0, buf);
+ ALF_Free(buf);
}
}