char* func()
{
char *str = new char[100];
char* retstr = str;
delete str;
return retstr;
};

こういう書きかたってマズイんでしょうか。