Is there a way to deregister a plugin creator? I see no such function on IPluginRegistry : https://github.com/NVIDIA/TensorRT/blob/07ed9b57b1ff7c24664388e5564b17f7ce2873e5/include/NvInferRuntimeCommon.h#L834. While there is a global registry from
getPluginRegistry, I as a user may not want my creators to be statics (for example, we can run into the static initialization order fiasco, we might throw exceptions which cannot be caught, or might want to more tightly control lifetimes). And I can’t have non-static creators if there’s no way to deregister them from the global registry (we’d hit use-after-free). Alternatively, instead of having a global plugin registry, TensorRT could have a model closer to the old factory model: users would create their own registry, and pass that in to the functions which need it (for example parsers).