message: Fix memory-leak in activations tests
diff: @@ -223,7 +223,7 @@ class QuantizedActivationsOpModel : public BaseActivationsOpModel {
  }
  };
  -const auto kTanhKernelMap = new std::map<string, TfLiteRegistration*>({
  +const auto kTanhKernelMap = std::map<string, TfLiteRegistration*>({
  {"Reference", ops::builtin::Register_TANH_REF()},
  {"GenericOptimized", ops::builtin::Register_TANH_GENERIC_OPT()},
  {"FixedPointOptimized", ops::builtin::Register_TANH_FIXED_POINT_OPT()},
  @@ -232,11 +232,11 @@ const auto kTanhKernelMap = new std::map<string, TfLiteRegistration*>({
  class TanhOpTest : public SingleOpTest {
  protected:
  const std::map<string, TfLiteRegistration*>& GetKernelMap() override {
  - return *kTanhKernelMap;
  + return kTanhKernelMap;
  }
  };
  -const auto kLogisticKernelMap = new std::map<string, TfLiteRegistration*>({
  +const auto kLogisticKernelMap = std::map<string, TfLiteRegistration*>({
  {"Reference", ops::builtin::Register_LOGISTIC_REF()},
  {"GenericOptimized", ops::builtin::Register_LOGISTIC_GENERIC_OPT()},
  {"FixedPointOptimized", ops::builtin::Register_LOGISTIC_FIXED_POINT_OPT()},
  @@ -245,7 +245,7 @@ const auto kLogisticKernelMap = new std::map<string, TfLiteRegistration*>({
  class LogisticOpTest : public SingleOpTest {
  protected:
  const std::map<string, TfLiteRegistration*>& GetKernelMap() override {
  - return *kLogisticKernelMap;
  + return kLogisticKernelMap;
  }
  };
  @@ -2255,7 +2255,7 @@ TEST(QuantizedActivationsOpTest, LogSoftmaxInt8) {
  }));
  }
  -const auto kPReluKernelMap = new std::map<string, TfLiteRegistration*>({
  +const auto kPReluKernelMap = std::map<string, TfLiteRegistration*>({
  {"Reference", ops::builtin::Register_PRELU_REF()},
  {"GenericOptimized", ops::builtin::Register_PRELU()},
  });
  @@ -2319,7 +2319,7 @@ class QuantizedPReluOpModel : public BasePReluOpModel {
  class PReluOpTest : public SingleOpTest {
  protected:
  const std::map<string, TfLiteRegistration*>& GetKernelMap() override {
  - return *kPReluKernelMap;
  + return kPReluKernelMap;
  }
  };
  @@ -2533,11 +2533,11 @@ TEST(FloatActivationsOpTest, LeakyRelu) {
  INSTANTIATE_TEST_SUITE_P(
  TanhOpTest, TanhOpTest,
  - ::testing::ValuesIn(SingleOpTest::GetKernelTags(*kTanhKernelMap)));
  + ::testing::ValuesIn(SingleOpTest::GetKernelTags(kTanhKernelMap)));
  INSTANTIATE_TEST_SUITE_P(
  LogisticOpTest, LogisticOpTest,
  - ::testing::ValuesIn(SingleOpTest::GetKernelTags(*kLogisticKernelMap)));
  + ::testing::ValuesIn(SingleOpTest::GetKernelTags(kLogisticKernelMap)));
  INSTANTIATE_TEST_SUITE_P(
  SoftmaxOpTest, SoftmaxOpTest,
  @@ -2545,7 +2545,7 @@ INSTANTIATE_TEST_SUITE_P(
  INSTANTIATE_TEST_SUITE_P(
  PReluOpTest, PReluOpTest,
  - ::testing::ValuesIn(SingleOpTest::GetKernelTags(*kPReluKernelMap)));
  + ::testing::ValuesIn(SingleOpTest::GetKernelTags(kPReluKernelMap)));
  } // namespace
  } // namespace tflite
  