void func(int n)
{
 void *a = (void*)new char[n];
 /*...*/
 delete[] (char*)a;
}

これってメモリリークを起こさずにうまく開放されるんでしょうか?