Use R ::= Q[x,y,z];
X := 3;
I := Ideal(x,y); -- dependent on R
ENV.R.Y := 5; -- in global memory bound to R
Use S ::= Q[a,b];
Destroy R;
RingEnvs(); -- R#1 created to hold because of the ideal I
["Q", "Qt", "R#1", "S", "Z"]
-------------------------------
Memory(); -- ENV.R.Y was destroyed along with R
["I", "It", "X"]
-------------------------------
I; -- I was not destroyed
R#1 :: Ideal(x, y)
-------------------------------
I := 3; -- overwrite I; it is no longer dependent on a CoCoA ring
Describe Memory();
------------[Memory]-----------
I = 3
It = R#1 :: Ideal(x, y)
X = 3
-------------------------------
RingEnvs(); -- subtle point here: the variable "It" is still dependent
-- on R#1
["Q", "Qt", "R#1", "S", "Z"]
-------------------------------
RingEnvs(); -- However, the previous command caused It to become a
-- string; hence, R#1 disappears.
["Q", "Qt", "S", "Z"]
-------------------------------
|