From: Pit Capitain Date: 2005-09-07T02:35:18+09:00 Subject: Re: Efficient Object Reconstruction? Austin Ziegler schrieb: > The attached program demonstrates this behaviour using Transaction::Simple. > > Any ideas, anyone? This seems to be a problem with the implementation of Transaction::Simple. The problem occurs when you have two objects that hold references to each other, say o1 and o2. When you start a transaction on o1, you store the current state as a Marshal dump of the object graph: o1 <-----> o2 When you rewind the transaction, you restore the Marshal dump. The resulting object graph contains new objects o1' and o2', holding references to each other. o1' <-----> o2' Since you don't want to return the new object o1' but reuse the original object o1, you replace all the instance variables of o1 by those of o1'. The resulting object graph then looks like this: o1' <-----> o2' <----- o1 <----- o2 I fear that a fix for this problem wouldn't fit into Transaction::*Simple* :-( Regards, Pit