Reset the shared and weak reference counts to the specified values.

Synopsis

Declared in <bslma_sharedptrrep.h>

void
resetCountsRaw(
    int numSharedReferences,
    int numWeakReferences);

Description

Reset the number of shared references and the number of weak references stored by this representation to the specified numSharedReferences and numWeakReferences respectively. This function is not thread‐safe and users must ensure that they serialize access to the SharedPtrRep object when calling this function. Note that this function updates the counts, but does not dispose of the representation or the object irrespective of the values of numSharedReferences and numWeakReferences.

Parameters

Name

Description

numSharedReferences

New shared‐reference count.

numWeakReferences

New weak‐reference count.

Created with MrDocs