void test(){
char* pChar;
pChar = newchar[200];
strcpy(pChar, "ffsafafafa");
}
int main(){
test();
// Is the pChar pointer is in the memory?
return 1;
}
It is not automatically deleted. You have to delete it.
Generally speaking, every new in your code should have a corresponding delete somewhere (though that doesn't mean you have to have an equal number of news and deletes).