#include <LightString.h>
Public Member Functions | |
LightString (char *memoryPointer, unsigned size) | |
Constructs value with the given data. | |
LightString (const LightString &ls) | |
Copy constructor. | |
const LightString & | operator= (const LightString &) |
safe assign operator | |
virtual | ~LightString () |
Destructor. | |
Public Attributes | |
char * | memoryPointer |
pointer to the stored string | |
int * | refCount |
pointer to the reference counter | |
unsigned | size |
Length of the stored string. |
It was designed reduce overhead while copying string to minimum. While being copied, the reference count is incremented as well as it is decremented when calling the destructor. The whole object is destructed as soon as the reference count reaches zero.
Definition at line 19 of file LightString.h.