by CarlRanson >> Thu, 7 Nov 2002 3:43:54 GMT
I agree that its a terribly difficult problem to work out which transients can be thrown away.
Im no expert, but i believe in the cases that it can be done it amounts to a graph connectivity problem, which is np-hard. But, as you point out, all transients are accessable via Jade which kills that plan dead in the water.
What about a simpler methodology whereby a class could be nominated as "transient cleanable". I would imagine the semantics to be that the epilog of any method that makes a transient instance of that class would automatically delete the instances made.
I guess it would be a new creation modifier as well, eg.
create iter transient cleanable;
that way it fits into the existing architecture of Persistant/transient on class definition or creation.
It would be pretty easy to implement i think, Jade would just have to keep an objectarray of objects created as "transient cleanable" for each method, and purge it in the epilog.
Any advances on this idea?
CR