Use R ::= QQ[x,y,z];
X := 3;
I := Ideal(x,y); -- dependent on R
ENV.R.Y := 5; -- in global memory bound to R
Use S ::= QQ[a,b];
Destroy R;
RingEnvs(); -- R#1 created to hold because of the ideal I
["QQ", "QQt", "R#1", "S", "ZZ"]
-------------------------------
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
["QQ", "QQt", "R#1", "S", "ZZ"]
-------------------------------
RingEnvs(); -- However, the previous command caused It to become a
-- string; hence, R#1 disappears.
["QQ", "QQt", "S", "ZZ"]
-------------------------------
|