Jameo Core Library
Loading...
Searching...
No Matches
Classes | Public Member Functions | Friends | List of all members
jm::AutoreleasePool Class Reference

This class provides the memory pool component to release objects at regular intervals that the programmer has designated for delayed release by Object::autorelease(). More...

Inheritance diagram for jm::AutoreleasePool:
jm::Object

Public Member Functions

 AutoreleasePool ()
 Constructor.
 
 ~AutoreleasePool () override
 Destructor.
 
void drain ()
 Sends a release() to all objects accumulated in the AutoreleasePool.
 
Mutexmutex ()
 Returns the pointer to the mutex object.
 
- Public Member Functions inherited from jm::Object
 Object () noexcept
 Constructor.
 
virtual ~Object () noexcept
 Destructor.
 
void release () noexcept
 Decreases the reference counter and releases the object immediately when the reference counter becomes 0.
 
Objectretain () noexcept
 Increases the reference counter of this object by 1.
 
Objectautorelease () noexcept
 Same function as release(), but releases the object with a delay if the reference counter is 0. AutoreleasePool::drain() must be called in the to release the object.
 
int32 referenceCount () const noexcept
 Returns the value of the reference counter.
 
virtual bool equals (const Object *other) const
 Comparison of objects.
 
virtual String displayName () const
 Returns the display name of the object intended to present to a user.
 
virtual void printDiffInfo (DiffOperation operation, Object *other) const
 Output method for outputting the diff results for the diff algorithm.
 
void setHighBit (bool status) noexcept
 
bool highBit () const noexcept
 

Friends

ObjectObject::autorelease () noexcept
 Allow Object::autorelease() access to AddObject().
 

Detailed Description

This class provides the memory pool component to release objects at regular intervals that the programmer has designated for delayed release by Object::autorelease().

Constructor & Destructor Documentation

◆ AutoreleasePool()

jm::AutoreleasePool::AutoreleasePool ( )

Constructor.

◆ ~AutoreleasePool()

jm::AutoreleasePool::~AutoreleasePool ( )
override

Destructor.

Member Function Documentation

◆ drain()

void jm::AutoreleasePool::drain ( )

Sends a release() to all objects accumulated in the AutoreleasePool.

◆ mutex()

Mutex * jm::AutoreleasePool::mutex ( )

Returns the pointer to the mutex object.

Friends And Related Symbol Documentation

◆ Object::autorelease

Allow Object::autorelease() access to AddObject().