From: <na...@us...> - 2007-01-16 17:09:36
|
Revision: 751 http://svn.sourceforge.net/instantobjects/revision/?rev=751&view=rev Author: nandod Date: 2007-01-16 09:09:37 -0800 (Tue, 16 Jan 2007) Log Message: ----------- * fix for test case 10 for circular references (on behalf of Joao Morais). Modified Paths: -------------- trunk/Source/Core/InstantPersistence.pas Modified: trunk/Source/Core/InstantPersistence.pas =================================================================== --- trunk/Source/Core/InstantPersistence.pas 2007-01-16 10:23:05 UTC (rev 750) +++ trunk/Source/Core/InstantPersistence.pas 2007-01-16 17:09:37 UTC (rev 751) @@ -6113,10 +6113,11 @@ var I: Integer; begin - CheckedObjects := TObjectList.Create(False); - try - if RefByCount = RefCount - 1 then - for I := Pred(RefByCount) downto 0 do + if RefByCount = RefCount - 1 then + for I := Pred(RefByCount) downto 0 do + begin + CheckedObjects := TObjectList.Create(False); + try if (FRefBy[I] is TInstantComplex) and IsInsideCircularReference(TInstantComplex(FRefBy[I])) then case TInstantComplex(FRefBy[I]).AttributeType of @@ -6125,9 +6126,10 @@ atReferences: TInstantReferences(FRefBy[I]).DestroyObject(Self); end; - finally - CheckedObjects.Free; - end; + finally + CheckedObjects.Free; + end; + end; end; procedure TInstantObject.FreeInstance; |