diff --git a/src/pg_query_outfuncs_protobuf_cpp.cc b/src/pg_query_outfuncs_protobuf_cpp.cc index 2debb640..842702b9 100644 --- a/src/pg_query_outfuncs_protobuf_cpp.cc +++ b/src/pg_query_outfuncs_protobuf_cpp.cc @@ -266,3 +266,11 @@ pg_query_nodes_to_json(const void *obj) return pstrdup(output.c_str()); } + +class Cleanup +{ +public: + ~Cleanup() { google::protobuf::ShutdownProtobufLibrary(); } +}; + +Cleanup cleanup;