File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed
Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,9 @@ interface
4040 Spring;
4141
4242const
43+ doOwnsKeys = Spring.doOwnsKeys;
44+ doOwnsValues = Spring.doOwnsValues;
45+
4346 caAdded = Spring.caAdded;
4447 caRemoved = Spring.caRemoved;
4548 caExtracted = Spring.caExtracted;
@@ -50,7 +53,7 @@ interface
5053 caReseted = Spring.caReset deprecated ' Use caReset instead' ;
5154
5255type
53- TDictionaryOwnerships = set of (doOwnsKeys, doOwnsValues) ;
56+ TDictionaryOwnerships = Spring.TDictionaryOwnerships ;
5457
5558 TCollectionChangedAction = Spring.TCollectionChangedAction;
5659
Original file line number Diff line number Diff line change @@ -490,6 +490,26 @@ TManagedInterfacedObject = class(TInterfacedObject)
490490 { $ENDREGION}
491491
492492
493+ { $REGION 'TDictionaryOwnerships}
494+
495+ // / <summary>
496+ // / Controls the ownership of objects stored in any associative collection.
497+ // / </summary>
498+ TDictionaryOwnerships = set of (
499+ // / <summary>
500+ // / Objects stored as key are being destroyed when removed
501+ // / </summary>
502+ doOwnsKeys,
503+
504+ // / <summary>
505+ // / Objects stored as value are being destroyed when removed
506+ // / </summary>
507+ doOwnsValues
508+ );
509+
510+ { $ENDREGION}
511+
512+
493513 { $REGION 'TCollectionChangedAction'}
494514
495515 // / <summary>
@@ -9328,7 +9348,7 @@ TWeakReferences = record
93289348procedure TWeakReferences.Initialize ;
93299349begin
93309350 fLock := TCriticalSection.Create;
9331- fWeakReferences := TObjectDictionary<Pointer, TList>.Create([doOwnsValues]);
9351+ fWeakReferences := TObjectDictionary<Pointer, TList>.Create([Generics.Collections. doOwnsValues]);
93329352end ;
93339353
93349354procedure TWeakReferences.Finalize ;
You can’t perform that action at this time.
0 commit comments