Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3089)

Issue 53053: Implement ShutdownProtobufLibrary().

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years ago by kenton
Modified:
14 years, 11 months ago
Reviewers:
jasonh
CC:
hong, protobuf_googlegroups.com
Base URL:
http://protobuf.googlecode.com/svn/trunk/src/
Visibility:
Public.

Description

By popular demand, implement a way to shut down the C++ protobuf library, deleting all dynamically-allocated global objects. I tested this using google-perftools' heapchecker with HEAPCHECK=draconian.

Patch Set 1 #

Total comments: 8

Patch Set 2 : Applied review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+254 lines, -43 lines) Patch
M src/google/protobuf/compiler/cpp/cpp_file.cc View 3 chunks +29 lines, -5 lines 0 comments Download
M src/google/protobuf/compiler/cpp/cpp_helpers.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/google/protobuf/compiler/cpp/cpp_helpers.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M src/google/protobuf/compiler/cpp/cpp_message.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/google/protobuf/compiler/cpp/cpp_message.cc View 2 chunks +20 lines, -4 lines 0 comments Download
M src/google/protobuf/descriptor.cc View 3 chunks +16 lines, -11 lines 0 comments Download
M src/google/protobuf/descriptor.pb.h View 19 chunks +19 lines, -0 lines 0 comments Download
M src/google/protobuf/descriptor.pb.cc View 2 chunks +40 lines, -0 lines 0 comments Download
M src/google/protobuf/extension_set.cc View 1 chunk +12 lines, -1 line 0 comments Download
M src/google/protobuf/stubs/common.h View 1 chunk +25 lines, -0 lines 0 comments Download
M src/google/protobuf/stubs/common.cc View 5 chunks +67 lines, -22 lines 0 comments Download
M src/google/protobuf/testing/googletest.cc View 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 4
kenton
Hi Jason, I'd like you to do a code review. I implemented this directly against ...
15 years ago (2009-04-29 01:54:16 UTC) #1
jasonh
Sorry about the delay. Mostly looks good, just a few nits http://codereview.appspot.com/53053/diff/1/5 File google/protobuf/compiler/cpp/cpp_file.cc (right): ...
14 years, 11 months ago (2009-05-06 01:03:13 UTC) #2
kenton
Addressed comments (see below) and synced, new patch set uploaded. http://codereview.appspot.com/53053/diff/1/5 File google/protobuf/compiler/cpp/cpp_file.cc (right): http://codereview.appspot.com/53053/diff/1/5#newcode401 ...
14 years, 11 months ago (2009-05-06 19:05:36 UTC) #3
jasonh
14 years, 11 months ago (2009-05-06 19:26:14 UTC) #4
Looks good!

On 2009/05/06 19:05:36, kenton wrote:
> Addressed comments (see below) and synced, new patch set uploaded.
> 
> http://codereview.appspot.com/53053/diff/1/5
> File google/protobuf/compiler/cpp/cpp_file.cc (right):
> 
> http://codereview.appspot.com/53053/diff/1/5#newcode401
> Line 401: 
> On 2009/05/06 01:03:14, jasonh wrote:
> > Indent() for prettier generated code?
> 
> Done.
> 
> http://codereview.appspot.com/53053/diff/1/6
> File google/protobuf/compiler/cpp/cpp_message.cc (right):
> 
> http://codereview.appspot.com/53053/diff/1/6#newcode608
> Line 608: "delete $classname$::default_instance_;\n"
> On 2009/05/06 01:03:14, jasonh wrote:
> > Set these to NULL for consistency with other parts of the library?
> 
> I figured I'd skip it and save some bytes of code size.
> 
> http://codereview.appspot.com/53053/diff/1/13
> File google/protobuf/extension_set.cc (right):
> 
> http://codereview.appspot.com/53053/diff/1/13#newcode84
> Line 84: delete registry_;
> On 2009/05/06 01:03:14, jasonh wrote:
> > registry_ = NULL;?
> 
> Done.
> 
> http://codereview.appspot.com/53053/diff/1/9
> File google/protobuf/stubs/common.cc (right):
> 
> http://codereview.appspot.com/53053/diff/1/9#newcode323
> Line 323: // We don't need to lock shutdown_fucntions_mutex because it's up to
> the
> On 2009/05/06 01:03:14, jasonh wrote:
> > s/fucntions/functions/
> 
> Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b