Re: Multithread and protobufs

75 views
Skip to first unread message

Артём Ибрагимов

unread,
Jul 16, 2012, 12:01:25 AM7/16/12
to prot...@googlegroups.com
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.



Артём Ибрагимов

unread,
Jul 16, 2012, 3:23:42 AM7/16/12
to prot...@googlegroups.com
Sorry... I forgot about other libraries those I use... It calls there...
Reply all
Reply to author
Forward
0 new messages