switched raw ptrs to shared_ptrs to avoid leaks 08/67908/2
authorKamil Rojewski <k.rojewski@samsung.com>
Fri, 22 Apr 2016 11:27:59 +0000 (13:27 +0200)
committerKamil Rojewski <k.rojewski@samsung.com>
Fri, 29 Apr 2016 08:04:24 +0000 (01:04 -0700)
Must be submitted with:
  - https://review.tizen.org/gerrit/67906

Change-Id: I5305bec45ff0484d00378a65269f3304dada449c

src/wgt/wgt_app_query_interface.cc

index b45389c..68da917 100644 (file)
@@ -64,9 +64,9 @@ std::string GetPkgIdFromPath(const std::string& path) {
     return {};
   }
   bf::path config_path = tmp_path / "config.xml";
-  std::vector<parser::ManifestHandler*> handlers = {
-    new wgt::parse::WidgetHandler(),
-    new wgt::parse::TizenApplicationHandler()
+  std::vector<std::shared_ptr<parser::ManifestHandler>> handlers = {
+    std::make_shared<wgt::parse::WidgetHandler>(),
+    std::make_shared<wgt::parse::TizenApplicationHandler>()
   };
   std::unique_ptr<parser::ManifestHandlerRegistry> registry(
       new parser::ManifestHandlerRegistry(handlers));