Skip to content

Instantly share code, notes, and snippets.

@leetreveil
Created October 7, 2011 16:03
Show Gist options
  • Save leetreveil/1270660 to your computer and use it in GitHub Desktop.
Save leetreveil/1270660 to your computer and use it in GitHub Desktop.
cfree
wchar_t* command = L"my command";
int len = wcslen(command) + 1;
wchar_t* w_msg = (wchar_t*)malloc(sizeof(wchar_t) * len);
wcscpy(w_msg, command);
free(w_msg);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment