Fixed memory allocation in LPWSTR and LPSTR constructors.