Quote Originally Posted by Daved View Post
I'm not very familiar with garbage collection in C++. Why do you need the delete [] arr if you're using garbage collection?
I want to at least understand typical programming practices in C++, especially if at some time in the future I'm forced to pull the garbage collector out. I've not really done that much programming in C++. I've done a lot of C programming, a decent amount of Java, a lot of Matlab, some D and a lot of Haskell, but never really had a chance to program in C++ oddly enough.

Thus for now I'm actually building destructors and even making a passing attempt at freeing arrays that I know need to be freed, or otherwise commenting the places in the code where such things need to happen in the future.

I find the GC convenient however and even comforting in an odd way. It allows for different programming styles and is especially convenient when I have to allocated a lot of small objects and arrays and don't want to worry about memory leaks. Perhaps for now it's just a nice way of easing into the language.