Hello,
we have GRPC interface inside a proprietary Linux dynamic library *.so in C++ which is loaded and unloaded in main process at runtime.
When we unload the library and try to load it again, we get the below error.
[libprotobuf ERROR google/protobuf/descriptor_database.cc:57] File already exists in database: my_interface.proto
[libprotobuf FATAL google/protobuf/descriptor.cc:1314] CHECK failed: generated_database_->Add(encoded_file_descriptor, size):
To clean all internal static objects in protobuf library, we probably need
void protobuf::ShutdownProtobufLibrary()
But the documentation says: "However, it is not safe to use any other part of the protocol buffers library after
ShutdownProtobufLibrary() has been called."
So this does not work completely, i.e. allow register and run services again... It looks like a programmer got tired of solving all the involved problems so it ended half-way?
Why "it is not safe", what is missing? Any workaround suggested?
Thank you.