posted 21 years ago
Hello There,
I have a hashtable (say H) which is accessed by other objects. The access to H is read only.
At a later point of execution,I change the data stored in H . So any NEW object accessing H will get the latest data, the same applies to any object already refering H. How can I impose that any object already refering H ,should get access only to the old data, and not the changed data.
One way to do this is, instead of sharing H, each object which want to access H, is given a new cloned copy of H, so even if the data in H is changed, they can still get access to old data.
But if the size of H is considerably high, then creating a copy everytime will involve huge memory.
Any alternative way to achieve this..
Mohamed Zafer