ORIGINAL
Loading...
Searching...
No Matches
Classes | Namespaces
singleton.h File Reference

Thread-safe singleton pattern implementation with ownership management. More...

#include "ownerPtr.h"
Include dependency graph for singleton.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  original::singleton< TYPE >
 Thread-safe singleton pattern implementation with ownership management. More...
 

Namespaces

namespace  original
 Main namespace for the project Original.
 

Detailed Description

Thread-safe singleton pattern implementation with ownership management.

This file implements a robust singleton pattern with the following features:

The singleton ensures that only one instance of the templated type exists throughout the application lifetime, with proper initialization order and destruction guarantees.

Note
This implementation is not thread-safe for simultaneous init()/reset() calls. For thread-safe usage, ensure proper synchronization at the application level.
The singleton instance is automatically destroyed when the program exits or when explicitly cleared/reset.