the plugin reflection example (Loading dynamically reflected types from dynamic libraries at runtime) segfaults at exit. It seems that the dynamic reflection runtime has references to the dynamic library types (cpp::dynamic_reflection::Type::TypeBehavior instances instanced by the dynamic library when registering its types) instanced by the library side. After unloading the library, that types metadata is freed by the executable side.
Solution: Pass a callback to SIPLASPLAS_REFLECTION_LOAD() instead of a reference to the reflection runtime, to ensure registration is run on the executable side.
the plugin reflection example (Loading dynamically reflected types from dynamic libraries at runtime) segfaults at exit. It seems that the dynamic reflection runtime has references to the dynamic library types (
cpp::dynamic_reflection::Type::TypeBehavior
instances instanced by the dynamic library when registering its types) instanced by the library side. After unloading the library, that types metadata is freed by the executable side.Solution: Pass a callback to
SIPLASPLAS_REFLECTION_LOAD()
instead of a reference to the reflection runtime, to ensure registration is run on the executable side.