![]() |
MySQL 9.3.0
Source Code Documentation
|
When a Polyglot wrapper for a C++ object is created, a collectable instance is created to be passed to the Polyglot object (Java). More...
#include <polyglot_collectable.h>
Public Member Functions | |
Collectable_registry ()=default | |
Collectable_registry (const Collectable_registry &)=delete | |
Collectable_registry (Collectable_registry &&)=delete | |
Collectable_registry & | operator= (const Collectable_registry &)=delete |
Collectable_registry & | operator= (Collectable_registry &&)=delete |
~Collectable_registry () | |
void | add (ICollectable *target) |
void | remove (ICollectable *target) |
void | clean () |
Deletes all collectables which were marked as to be deleted. More... | |
Private Member Functions | |
void | clean_unsafe () |
Private Attributes | |
std::mutex | m_cleanup_mutex |
std::unordered_set< ICollectable * > | m_live_collectables |
std::vector< ICollectable * > | m_phantom_collectables |
When a Polyglot wrapper for a C++ object is created, a collectable instance is created to be passed to the Polyglot object (Java).
The memory associated to the collectable must be released when it is no longer needed in the Java side.
Each collectable will be registered here and marked to be deleted under the following scenarios:
The memory is released after calling clean() method.
|
default |
|
delete |
|
delete |
shcore::polyglot::Collectable_registry::~Collectable_registry | ( | ) |
void shcore::polyglot::Collectable_registry::add | ( | ICollectable * | target | ) |
void shcore::polyglot::Collectable_registry::clean | ( | ) |
Deletes all collectables which were marked as to be deleted.
|
private |
|
delete |
|
delete |
void shcore::polyglot::Collectable_registry::remove | ( | ICollectable * | target | ) |
|
private |
|
private |
|
private |