There are basically two points people are making in regards to gotos and your code:
1. Goto is bad. It's very rare to encounter a place where you need
gotos, but I wouldn't suggest striking it completely. Though C++ has
smart enough control flow to make goto rarely appropriate.
2. Your mechanism for cleanup is wrong: This point is far more
important. In C, using memory management on your own is not only OK but
often the best way to do things. In C++, your goal should be to avoid
memory management as much as possible. You should avoid memory
management as much as possible. Let the compiler do it for you. Rather
than using new, just declare variables. The only time you'll really
need memory management is when you don't know the size of your data in
advance. Even then, you should try to just use some of the STL
In the event that you legitimately need memory management (you have
not really provided any evidence of this), then you should encapsulate
your memory management within a class via constructors to allocate
memory and deconstructors to deallocate memory.
Your response that your way of doing things is much easier is not
really true in the long run. Firstly, once you get a strong feel for
C++ making such constructors will be 2nd nature. Personally, I find
using constructors easier than using cleanup code, since I have no need
to pay careful attention to make sure I am deallocating properly.
Instead, I can just let the object leave scope and the language handles
it for me. Also, maintaining them is MUCH easier than maintaining a
cleanup section and much less prone to problems.
In short, goto may be a good choice in some situations but not in this one. Here it's just short term laziness.