BloombergLP::bslma::TestAllocator::status

Return a status code summarizing mismatches and outstanding memory.

Synopsis

Declared in <bslma_testallocator.h>

int
status() const;

Description

Return 0 on success, and non-zero otherwise: If there have been any mismatched memory deallocations or over/under runs, return the number of such errors that have occurred as a positive number; if either 0 < numBlocksInUse() or 0 < numBytesInUse(), return an arbitrary negative number; else return 0.

Return Value

0 on success, positive for mismatches, or negative for leaks