Changeset View
Changeset View
Standalone View
Standalone View
chronik/chronik-cpp/chronik_validationinterface.cpp
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | void StartChronikValidationInterface( | ||||
rust::Box<chronik_bridge::Chronik> chronik_box) { | rust::Box<chronik_bridge::Chronik> chronik_box) { | ||||
g_chronik_validation_interface = | g_chronik_validation_interface = | ||||
std::make_unique<ChronikValidationInterface>(node, | std::make_unique<ChronikValidationInterface>(node, | ||||
std::move(chronik_box)); | std::move(chronik_box)); | ||||
g_chronik_validation_interface->Register(); | g_chronik_validation_interface->Register(); | ||||
} | } | ||||
void StopChronikValidationInterface() { | void StopChronikValidationInterface() { | ||||
if (g_chronik_validation_interface) { | |||||
g_chronik_validation_interface->Unregister(); | g_chronik_validation_interface->Unregister(); | ||||
// Reset so the Box is dropped and all handles are released. | // Reset so the Box is dropped and all handles are released. | ||||
g_chronik_validation_interface.reset(); | g_chronik_validation_interface.reset(); | ||||
} | } | ||||
} | |||||
} // namespace chronik | } // namespace chronik |