csapi-sensor: fix bug about the lifetime of delegate
authorkibak.yoon <kibak.yoon@samsung.com>
Tue, 15 Nov 2016 10:26:01 +0000 (19:26 +0900)
committerkibak.yoon <kibak.yoon@samsung.com>
Thu, 15 Dec 2016 04:00:52 +0000 (13:00 +0900)
commit9b9d1a19964d4d0431d5efbdf4ba2aba60879980
tree6eb11370b7be8e01ae86f07daf676504641ae3a0
parent1e3696d7ce7e26071ffe4842a56d163f427ea822
csapi-sensor: fix bug about the lifetime of delegate

When the callback is passed to the native layer using PInvoke,
the lifetime of delegate has to be considered.
if the member function is passed to the interop directly, the memory
allocated within this function is not managed by the GC.

Change-Id: I06ab30b0e62c1f4baba5bcb38dd75f9764a3b0d5
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
29 files changed:
src/Tizen.Sensor/Tizen.Sensor/Plugins/Accelerometer.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/ActivityDetector.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/FaceDownGestureDetector.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/GravitySensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/Gyroscope.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/GyroscopeRotationVectorSensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/HumiditySensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/InVehicleActivityDetector.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/LightSensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/LinearAccelerationSensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/Magnetometer.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/MagnetometerRotationVectorSensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/OrientationSensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/Pedometer.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/PickUpGestureDetector.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/PressureSensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/ProximitySensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/RotationVectorSensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/RunningActivityDetector.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/SleepMonitor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/StationaryActivityDetector.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/TemperatureSensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/UltravioletSensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedGyroscope.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedMagnetometer.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/WalkingActivityDetector.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/WristUpGestureDetector.cs
src/Tizen.Sensor/Tizen.Sensor/Sensor.cs [changed mode: 0755->0644]