Hashtable: Clean

Clean

Removes Deleted buckets from the internal array.



 Public Sub Clean ( )

Remarks

When many items have been deleted from the table, the buckets that contained the items are marked as Deleted. When many buckets are marked as Deleted, the search routine cannot stop searching the buckets for a duplicate key even if an empty Deleted bucket has been found. So to prevent the unnessecary searching past Deleted buckets, the table should be cleaned to remove the Deleted buckets and only have Empty and Occupied buckets remaining.

This is recommended when a large number of items are deleted.

See Also

Project CorLib Overview

Class Hashtable Overview