FindResource and CreateResource issue fix in Simulator.
authorspurthi.segu <spurthi.segu@samsung.com>
Wed, 7 Oct 2015 14:03:00 +0000 (19:33 +0530)
committerMadan Lanka <lanka.madan@samsung.com>
Thu, 8 Oct 2015 00:38:37 +0000 (00:38 +0000)
Change-Id: I79b060680e52be77fb8779a12ca701e0d3eadbdf
Signed-off-by: spurthi.segu <spurthi.segu@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/3729
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
service/simulator/java/jni/simulator_manager_jni.cpp
service/simulator/src/service-provider/simulator_resource_creator.cpp

index a95e7b8..6ae6e58 100644 (file)
@@ -217,7 +217,6 @@ class JNIFoundResourceListener
                 return;
             }
 
-            delete jniSimulatorResource;
             releaseEnv();
         }
 
index 6f77b74..18bd97a 100755 (executable)
@@ -52,7 +52,7 @@ SimulatorResourceServerImplSP SimulatorResourceCreator::createResource(
 
     if (ramlResource)
     {
-        SimulatorResourceServerImplSP simResource = std::make_shared<SimulatorResourceServerImpl>();
+        SimulatorResourceServerImplSP simResource(new SimulatorResourceServerImpl());
         simResource->setName(ramlResource->getDisplayName());
         simResource->setURI(ramlResource->getResourceUri());