Loading...
Searching...
No Matches
by::instancer Class Reference

Singleton manager for instance lifecycle and memory allocation. More...

#include <instancer.hpp>

Public Member Functions

nbool bind (const instance &it)
 Binds instance for lifecycle management.
 
nbool bind (const instance *it) BY_SIDE_FUNC(bind)
 
nbool rel (const instance &old)
 Releases instance from lifecycle management.
 
nbool rel (const instance *it) BY_SIDE_FUNC(rel)
 
const poolgetPool () const
 
const watchergetWatcher () const
 

Static Public Member Functions

static meget ()
 

Friends

class memliteInternal
 

Detailed Description

Singleton manager for instance lifecycle and memory allocation.

Contains pool class for low-level memory management and watcher for managing instance lifecycles. Controls both to manage instance lifecycle (allocation/destruction). Effectively serves as the entry point for dispatching work to control classes or issuing commands for core memlite operations.

Member Function Documentation

◆ bind()

nbool by::instancer::bind ( const instance & it)

Binds instance for lifecycle management.

Returns
true on success, false if already bound or binding fails
Note
Allocates life object from watcher for reference counting

◆ get()

static me * by::instancer::get ( )
static
Returns
singleton instance. this returns nul of reference if app is about to be terminated.

◆ rel()

nbool by::instancer::rel ( const instance & old)

Releases instance from lifecycle management.

Returns
true on success, false if not bound or release fails
Note
Decrements reference count. Destroys instance when count reaches 0.

The documentation for this class was generated from the following file: