All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_MemoryCounterUnique Class Reference

#include <UT_MemoryCounter.h>

+ Inheritance diagram for UT_MemoryCounterUnique:

Public Member Functions

 UT_MemoryCounterUnique ()
 ~UT_MemoryCounterUnique () override
bool countShared (size_t size, exint refcount, const void *p) override
- Public Member Functions inherited from UT_MemoryCounter
 UT_MemoryCounter ()
virtual ~UT_MemoryCounter ()
virtual void reset ()
void countUnshared (size_t size)
virtual size_t getCount () const
bool mustCountShared () const
bool mustCountUnshared () const

Additional Inherited Members

- Protected Member Functions inherited from UT_MemoryCounter
 UT_MemoryCounter (const bool countshared, const bool countunshared)

Detailed Description

This subclass counts shared memory that is unique to something, i.e. nothing else references the same memory blocks. Since this class just uses the UT_MemoryCounter's unshared count, it doesn't need to implement reset() or getCount().

Definition at line 157 of file UT_MemoryCounter.h.

Constructor & Destructor Documentation

UT_MemoryCounterUnique::UT_MemoryCounterUnique ( )

Definition at line 160 of file UT_MemoryCounter.h.

UT_MemoryCounterUnique::~UT_MemoryCounterUnique ( )

Definition at line 163 of file UT_MemoryCounter.h.

Member Function Documentation

bool UT_MemoryCounterUnique::countShared ( size_t  size,
exint  refcount,
const void p 

This counts shared memory according to the requirements of the use case. Since this use case only counts memory unique to something, it only adds to the count if refcount==1.

Reimplemented from UT_MemoryCounter.

Definition at line 168 of file UT_MemoryCounter.h.

The documentation for this class was generated from the following file: