[enco] Invoke ANeuralNetworksEvent_free in cpp file (#3019)
author남궁석/On-Device Lab(SR)/Engineer/삼성전자 <sk.namkoong@samsung.com>
Mon, 11 Feb 2019 08:09:23 +0000 (17:09 +0900)
committer박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Mon, 11 Feb 2019 08:09:23 +0000 (17:09 +0900)
Until now, c++ code that enco NNAPI backend generates didn't invoke `ANeuralNetworksEvent_free`
This commit will fix it

Signed-off-by: Seok NamKoong <sk.namkoong@samsung.com>
contrib/enco/core/src/CppGen/Subnet.cpp

index 926fb39..9ee7610 100644 (file)
@@ -412,6 +412,7 @@ std::unique_ptr<pp::MultiLineText> SubnetBlockCompiler::compile(const ANNBinder
 
   res->append("ANeuralNetworksExecution_startCompute(execution, &event);");
   res->append("ANeuralNetworksEvent_wait(event);");
+  res->append("ANeuralNetworksEvent_free(event);");
 
   res->append("ANeuralNetworksExecution_free(execution);");