memory leak fix + php/js/python transition to class based generator

This commit is contained in:
Lakedaemon
2016-04-26 17:08:13 +02:00
parent 38597160f2
commit 6765c19d45
6 changed files with 153 additions and 98 deletions

View File

@@ -688,8 +688,8 @@ class GoGenerator : public BaseGenerator {
bool GenerateGo(const Parser &parser, const std::string &path,
const std::string &file_name) {
go::GoGenerator *generator = new go::GoGenerator(parser, path, file_name);
return generator->generate();
go::GoGenerator generator(parser, path, file_name);
return generator.generate();
}
} // namespace flatbuffers