I don't know Dennis, but shouldn't you use delete after new?

PHP Code:
HWND hwnd;
int len;
char text;

hwnd GetDlgItem(hwnd_of_parent_dialog_boxID_OF_THE_ITEM);
len GetWindowTextLength(hwnd) + 1;
text = new char[len];
GetWindowText(hwndtextlen);
delete [] text
not sure, so I want to know