Hi,
Would reusing a string pointer in the following way valid? I mean would the memory allocated for the constant string "some string" freed appropriately when the program quits?
Also, since the constant string "some string" won't get stored in heap memory, when does it go out of scope? only when main quits?Code:void func() { WCHAR* pszString = L"some string"; pszString = L"some other string"; } int main(...) { ... func(); ... }
Thanks!