I still can't find when calls
ShutdownProtobufLibrary();
I was looking for it in sources of protobufs, and I couldn't find it there.
Of course when I commented this in common.cc(libprotobuf(not lite)):
for (int i = 0; i < internal::shutdown_functions->size(); i++) {
internal::shutdown_functions->at(i)();
}
My toolbars didn't crash, after closing second tab.
Or when I commented this in my proto file:
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_toolbars_2eproto);
And this is in descriptor.cc:
internal::OnShutdown(&DeleteGeneratedPool);
As I understand my toollbar crashes cause, after ShutdownProtobufLibrary all static variables are deleted.
It's ok if only a thread uses it. But there are some threads(depends on count of tabs) in my toolbar. And when a tab is closed another tab can't use references of messages.
Please, help me) Who calls ShutdownProtobufLibrary ?
Thanks.