Try executing the following command:
Remove[a]; a := 1
It removes symbol "a", but does not define it.
Of course, when executing separately, the following two commands
a := 1
do what is expected.
Does anyone know, why a symbol definition following the removal of this symbol does not work?
P.S. I need this to manage memory usage by large amounts of data, e.g.:
(1) originally D is SetDelayed to load a huge array from disk into D, thereby D does not occupy a lot of memory before first use;
(2) once D is used first time, it turnes into a huge array;
(3) a symbol ClearD is defined (by SetDelayed), which removes D and then defines it as described in (1).
Thus D representing a huge array of data is available for computations anytime, but using the original SetDelayed definition and ClearD, I control its usage of memory.