Thank you, I forgot that you have to delete in C++.
I know that passing by reference is very common in C++, but I just can't seem to get used to it. For me, a function is a subroutine that takes parameters and returns values. But I guess it's my Pascal background talking. Also, I much prefer Perl's approach to the whole pointer/reference thing. Please don't hate me.