This is not about garbage collection but about sound programming practices.
Doubles are not integers - while obvious this has subtle consequences. It is unlikely that the value is actually -0.0 but in fact a very small negative number which can be shown using your debugger. Doing this this would have answered the question for you.
Never test a double in this way:
if (i->GetBalance() != 0)
Read here:
https://isocpp.org/wiki/faq/newbie#floating-point-arith[
^]