I think anon has a good point: is abc::func() being run more than once? It doesnt matter if you only allocate inside of func() and deallocate in the destructor. But it does matter if you run abc::func() more than once without a delete[] a in between the calls.