BFLibCPP 0.1
CPP Library
|
#include <object.hpp>
Public Member Functions | |
Object () | |
Object (Object &obj) | |
virtual | ~Object () |
Static Public Member Functions | |
static void | retain (Object *obj) |
static void | release (Object *obj) |
static int | retainCount (Object *obj) |
static int | retainCount (Object &obj) |
Base class Object is specifically designed to imitate Apple's Core Foundation memory management. Every class that adopts this object will have a memory retaining counter. Owner of class can choose to manually release memory with delete
or to use Object::release()
.
Object::Object | ( | ) |
Object::Object | ( | Object & | obj | ) |
if someone is doing a shallow copy of this object, I want to make sure the new copy has their own lock and a retain count that is reset
|
virtual |
|
static |
decrements retain count by 1
if retain count reaches 0, this function will delete obj
. Using obj
after will incur undefined behavior
|
static |
increments retain count by 1
|
static |
|
static |