Loading...
Searching...
No Matches
instancer.hpp
Go to the documentation of this file.
1
2#pragma once
3
6
7namespace by {
8
16 class _nout instancer {
17 BY(ME(instancer))
18 friend class memliteInternal;
19
20 public:
21 ~instancer();
22
23 public:
29 nbool bind(const instance& it);
30 nbool bind(const instance* it) BY_SIDE_FUNC(bind);
31
38 nbool rel(const instance* it) BY_SIDE_FUNC(rel);
39 const pool& getPool() const;
40 const watcher& getWatcher() const;
41
46 static me* get();
47
48 private:
55 void* _new1(size_t sz);
56
63 void _del(void* pt, ncnt sz);
64
70 nbool _hasBindTag(const instance& it) const;
71
72 private:
73 instancer() = default;
74
75 private:
76 static nbool _isRel;
77 pool _pool;
78 watcher _watcher;
79 };
80} // namespace by
Base class for all managed instances in memlite system.
Definition instance.hpp:41
Singleton manager for instance lifecycle and memory allocation.
Definition instancer.hpp:16
nbool bind(const instance &it)
Binds instance for lifecycle management.
static me * get()
nbool rel(const instance &old)
Releases instance from lifecycle management.
Definition memliteInternal.hpp:12
Memory pool manager for efficient instance allocation.
Definition pool.hpp:21
Memory watcher for tracking instance lifecycle and allocation.
Definition watcher.hpp:20
Rich logging support with polymorphic type conversion.
Definition richLog.hpp:34