diff --git a/mace/examples/android/build.sh b/mace/examples/android/build.sh index 4bbb177d406df158ad839c59ba122bf0c082df68..c1bf9cbbc0627e38f876449dc5d8e92e7ae0f6a7 100755 --- a/mace/examples/android/build.sh +++ b/mace/examples/android/build.sh @@ -56,7 +56,7 @@ python tools/converter.py convert --config=mace/examples/android/mobilenet.yml - cp -rf builds/mobilenet/include/mace/public/*.h $INCLUDE_DIR cp -rf builds/mobilenet/model $LIBRARY_DIR -bazel build --config android --config optimization $BAZEL_LIBMACE_TARGET --define neon=true --define openmp=true --define opencl=true --cpu=$TARGET_ABI +bazel build --config android --config optimization $BAZEL_LIBMACE_TARGET --define neon=true --define openmp=true --define opencl=true --define quantize=true --cpu=$TARGET_ABI cp -rf mace/public/*.h $INCLUDE_DIR cp -rf $BAZEL_GEN_LIBMACE_PATH $LIBMACE_DIR diff --git a/mace/examples/android/macelibrary/src/main/cpp/image_classify.cc b/mace/examples/android/macelibrary/src/main/cpp/image_classify.cc index b414782a8462cee1bf596a9cae00718b30ff9844..f27519b634806d2ac5f0d8e72fe5a22d8387403d 100755 --- a/mace/examples/android/macelibrary/src/main/cpp/image_classify.cc +++ b/mace/examples/android/macelibrary/src/main/cpp/image_classify.cc @@ -68,6 +68,7 @@ mace::DeviceType ParseDeviceType(const std::string &device) { } MaceContext& GetMaceContext() { + // TODO(yejianwu): In multi-dlopen process, this step may cause memory leak. static auto *mace_context = new MaceContext; return *mace_context;