Great question. It's basically been answered here....
(1) For local (that is, automatic variables, allocated on the stack), they are destroyed when the associated variable goes out of scope.
(2) If they are allocated with "new", then you must explicitly delete them.
(3) For global/static variables, the objects are destroyed when the program ends.
(4) Otherwise, all objects are supposed to be de-allocated (by default) when the program ends. I'm not sure
you should always count on this, however. I would still take special care to explicitly delete objects allocated with "new."
Hope this helps,
Brian Overland