Udostępnij za pośrednictwem


CAtlMap::DisableAutoRehash

Call this method to disable automatic rehashing of the CAtlMap object.

void DisableAutoRehash( ) throw( );

Remarks

When automatic rehashing is enabled (which it is by default), the number of bins in the hash table will automatically be recalculated if the load value (the ratio of the number of bins to the number of elements stored in the array) exceeds the maximum or minimum values specified at the time the map was created.

DisableAutoRehash is most useful when a large number of elements will be added to the map at once. Instead of triggering the rehashing process every time the limits are exceeded, it is more efficient to call DisableAutoRehash, add the elements, and finally call CAtlMap::EnableAutoRehash.

Requirements

Header: atlcoll.h

See Also

Reference

CAtlMap Class

CAtlMap::EnableAutoRehash

Other Resources

CAtlMap Members