Click or drag to resize

CondensedCollectionTCleanup Method

[This is preliminary documentation and is subject to change.]

Rebuilds the collection's internal data structures, reclaiming unused items and potentially freeing memory.

Namespace:  Condensed
Assembly:  Condensed (in Condensed.dll) Version: 0.1.0.0 (0.1.0.0)
Syntax
public virtual int Cleanup()

Return Value

Type: Int32
Count of items removed from the intern pool, or -1 if the collection has already cutover to a non-deduplicated list.
Remarks

Cleanups are potentially expensive operations that should only be performed on an occasional basis. Instead of calling this method directly, you can use the InternedValueReclaimable event as an occasion to decide whether a cleanup should be performed--consider performing cleanups only when the InternPoolCount is substantially larger than the UniqueCount.

Cleanup cannot be performed on a CondensedCollection that has cutover to normal (non-deduplicated) list storage because its internal pool and refcounting information has been lost. Reconstruct the collection from itself to rebuild it and restart deduplication.

See Also