| Einhugur Framework for C++ |
|
Object Class
A base class for all other Object Reference counted Object types.
Most Objects in the Einhugur Framework are Reference counted.
For Reference counted object the following rules apply:
They should not be created on the stack. Which means they may only be created with the new operator.
They may not be deleted with the delete operator. Use the Release function on the Object class instead.
There are exceptions to this where the following classes are not a part of the reference counting system:
String: The String class is special, it should only be created on the stack and not with the new operator.
Locale: The Locale class only has Static members so there is no need to create any instance of it.
Exceptions: All exception classes in the framework should be created on the stack only and not with the new operator.
Constructors
Object | The constructor for Object. |
Methods
Release | Decreases reference count by one and deletes the object if the reference count reached zero. |
Retain | Increases the reference count by one. |