I'm calling the following function:
And, for some reason, even though it's been free()'d, I'm still getting this: (see attachment).Code:unsigned int Test(void)
{
char *var;
var = (char*) malloc(255);
memset((void*)var,0,254);
strcpy(var,"A string.");
free(var);
MessageBox(NULL,var,"Data in var",MB_OK);
return 0;
}
Is this supposed to happen? o_O