Well what I meant with Java's garbage collection is it's "every object is a 'pointer'" idea. Meaning:

String b = "asdf";
b = "1234";

In that instance, what actually happens is, a new String has actually been instantiated ("1234"), and the old string ("asdf") has to be garbage collected. In C++, that isn't what happens. C++ will realize that the string b already has 4 bytes of memory allocated to it, so rather than allocating a new 4 bytes, it simply overwrites "asdf" with "1234" where as, in Java it actually deletes "asdf" (releases it to the OS) and then allocates "1234". Like I said though, both languages have their strengths and weaknesses. Anyone who uses C++ to try and make a 100% portable program would be crazy, where as using Java would be very reasonable.