![]() |
CLA3P v0.3.1
Compact Linear Algebra Parallel Portable Package
|
Memory ownership metadata. More...

Public Member Functions | |
| Ownership () | |
| Default constructor. | |
| Ownership (bool owner) | |
| Ownership constructor. | |
| ~Ownership () | |
| Destructor. | |
| bool | owner () const |
| Tests memory ownership. | |
| void | unbind () |
| Relinquishes memory ownership. | |
Memory ownership metadata.
Tracks whether an object is responsible for deallocating its associated memory. When the ownership flag is true, the object will deallocate its contents upon destruction.
| cla3p::Ownership::Ownership | ( | ) |
Default constructor.
Initializes ownership state to default.
| cla3p::Ownership::Ownership | ( | bool | owner | ) |
| cla3p::Ownership::~Ownership | ( | ) |
Destructor.
Destroys the ownership metadata object.
| bool cla3p::Ownership::owner | ( | ) | const |
Tests memory ownership.
Returns true if the object is responsible for deallocating its contents. When true, memory is automatically freed upon object destruction.
true if the object owns its contents, false otherwise. | void cla3p::Ownership::unbind | ( | ) |
Relinquishes memory ownership.
Makes the object no longer responsible for content deallocation. Use with caution as this may lead to memory leaks if the contents are not deallocated manually. Auto-allocated data should be freed using i_free().