From: Tomasz Marciniak Date: Mon, 18 May 2015 07:11:50 +0000 (+0200) Subject: [SystemInfo] Unregister all listeners in destructor. X-Git-Tag: submit/tizen_tv/20150603.064601~1^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=09e3ff73669ba1849ccd711a98c8dd80e2ad9679;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [SystemInfo] Unregister all listeners in destructor. [Verification] Code compiles without errors. SystemInfo_addPropertyValueChangeListener_with_options passes. Change-Id: Ibe408f0a3288c1df4035f80088c1e75d1bf51c6f Signed-off-by: Tomasz Marciniak --- diff --git a/src/systeminfo/systeminfo_instance.cc b/src/systeminfo/systeminfo_instance.cc index 3eced3ea..acf3af91 100644 --- a/src/systeminfo/systeminfo_instance.cc +++ b/src/systeminfo/systeminfo_instance.cc @@ -129,6 +129,21 @@ SysteminfoInstance::SysteminfoInstance() { } SysteminfoInstance::~SysteminfoInstance() { + LoggerD("Entered"); + //TODO Below solution is temporary + //Implementation should be changed that each SysteminfoInstance object + //should have own SystemInfoListeners manager + SysteminfoUtils::UnregisterBatteryListener(); + SysteminfoUtils::UnregisterCpuListener(); + SysteminfoUtils::UnregisterStorageListener(); + SysteminfoUtils::UnregisterDisplayListener(); + SysteminfoUtils::UnregisterDeviceOrientationListener(); + SysteminfoUtils::UnregisterLocaleListener(); + SysteminfoUtils::UnregisterNetworkListener(); + SysteminfoUtils::UnregisterWifiNetworkListener(); + SysteminfoUtils::UnregisterCellularNetworkListener(); + SysteminfoUtils::UnregisterPeripheralListener(); + SysteminfoUtils::UnregisterMemoryListener(); } void SysteminfoInstance::GetCapabilities(const picojson::value& args, picojson::object& out) {