Merge pull request #2949 from xfxyjwf/3.3.x
Cleanup reflection objects for map entry.
This commit is contained in:
commit
e91caa1f19
@ -751,6 +751,15 @@ void FileGenerator::GenerateBuildDescriptors(io::Printer* printer) {
|
||||
message_generators_[i]->GenerateShutdownCode(printer);
|
||||
}
|
||||
|
||||
if (HasDescriptorMethods(file_, options_)) {
|
||||
for (int i = 0; i < message_generators_.size(); i++) {
|
||||
if (!IsMapEntryMessage(message_generators_[i]->descriptor_)) continue;
|
||||
printer->Print(
|
||||
"delete file_level_metadata[$index$].reflection;\n",
|
||||
"index", SimpleItoa(i));
|
||||
}
|
||||
}
|
||||
|
||||
printer->Outdent();
|
||||
printer->Print(
|
||||
"}\n\n");
|
||||
|
@ -133,6 +133,7 @@ void TableStruct::Shutdown() {
|
||||
delete file_level_metadata[2].reflection;
|
||||
_ListValue_default_instance_.Shutdown();
|
||||
delete file_level_metadata[3].reflection;
|
||||
delete file_level_metadata[0].reflection;
|
||||
}
|
||||
|
||||
void TableStruct::InitDefaultsImpl() {
|
||||
|
Loading…
Reference in New Issue
Block a user