Skip to content

EntropyEngine::Core::WeakControlBlock

Control block for handling safe weak references to EntropyObjects. More…

#include <WeakControlBlock.h>

Name
voidretain()
voidrelease()
WeakControlBlock(EntropyObject * obj)
Name
std::atomic< uint32_t >refCount
EntropyObject *object
std::mutexmutex
struct EntropyEngine::Core::WeakControlBlock;

Control block for handling safe weak references to EntropyObjects.

This block allows WeakRef instances to safely check if the underlying object is still alive. The block persists as long as either the object is alive OR there are any WeakRefs pointing to it.

inline void retain()
inline void release()
inline explicit WeakControlBlock(
EntropyObject * obj
)
std::atomic< uint32_t > refCount {1};
EntropyObject * object = nullptr;
std::mutex mutex;

Updated on 2026-01-26 at 17:14:35 -0500