Version

Compact Method (SparseArray)

Removes data structures allocated for empty slots in the sparse array.
Syntax
'Declaration
 
Public Sub Compact() 
public void Compact()
Remarks

Over time setting non-null slots to null can result in sparse array holding onto data structures that are not necessary since all the associated slots are null values. Calling this method will cause the sparse array to release those data structures.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also