Hello, I have something like this:
void Test(void)
{
char errorMessage[256];
spintf(errorMessage,... blablabla);
throw new CustomException(errorMessage);
}
Will this be a memory leak because errorMessage will be not freed? Or will this cause an exception when accessing the message of the exception inside a try{}catch because the errorMessage has been freed when going out from the function¿?
Thanks in advance.