Inheritance diagram for DiObjectCounter:

Public Member Functions | |
| void | addReference () |
| add a reference. | |
| void | removeReference () |
| remove a reference. | |
Protected Member Functions | |
| DiObjectCounter () | |
| constructor. | |
| virtual | ~DiObjectCounter () |
| destructor | |
Private Attributes | |
| unsigned long | Counter |
| internal counter | |
used to manage more than one reference to an object in a secure way.
Definition at line 49 of file diobjcou.h.
|
|
constructor. Internal counter is initialized with 1. Definition at line 95 of file diobjcou.h. |
|
|
add a reference. Increase the internal counter by 1. Definition at line 57 of file diobjcou.h. References Counter. |
|
|
remove a reference. Decrease the internal counter by 1 and delete the object only if the counter is zero. Definition at line 71 of file diobjcou.h. References Counter. |