Merge "Fix memory leak in aapt2"
This commit is contained in:
@@ -169,17 +169,12 @@ int MainImpl(int argc, char** argv) {
|
|||||||
aapt::text::Printer printer(&fout);
|
aapt::text::Printer printer(&fout);
|
||||||
|
|
||||||
aapt::StdErrDiagnostics diagnostics;
|
aapt::StdErrDiagnostics diagnostics;
|
||||||
auto main_command = new aapt::MainCommand(&printer, &diagnostics);
|
aapt::MainCommand main_command(&printer, &diagnostics);
|
||||||
|
|
||||||
// Add the daemon subcommand here so it cannot be called while executing the daemon
|
// Add the daemon subcommand here so it cannot be called while executing the daemon
|
||||||
main_command->AddOptionalSubcommand(
|
main_command.AddOptionalSubcommand(
|
||||||
aapt::util::make_unique<aapt::DaemonCommand>(&fout, &diagnostics));
|
aapt::util::make_unique<aapt::DaemonCommand>(&fout, &diagnostics));
|
||||||
return main_command->Execute(args, &std::cerr);
|
return main_command.Execute(args, &std::cerr);
|
||||||
}
|
|
||||||
|
|
||||||
// TODO(b/141312058) stop leaks
|
|
||||||
extern "C" const char *__asan_default_options() {
|
|
||||||
return "detect_leaks=0";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
|
|||||||
Reference in New Issue
Block a user