Yes, once the delete routine is used the memory is freed but in the code
sample he gave the delete call was enclosed in the destructor for the
class. Since from the code he wasn't using delete anywhere else he had to
call the destructor implicitly. Not doing so would kill the variable but
not free the memory used by the variable. There is the chance that it
will be allocated to another variable along the line but it's always
better to make sure you kill the variable yourself or else you risk losing
some of your available memory.
--Joe
>
> Joseph Keen wrote:
>
> > In C++ you must always specifically call the destructor before the
> > variable goes out of scope.
>
> Wrong. The destructor will be called automatically when the variable
> ceases to exist (i.e. upon leaving the enclosing function for
> automatic variables, upon delete for dynamic variables, and upon
> program termination for static variables).
>
> --
> Glynn Clements <[EMAIL PROTECTED]>
>