sensord: use shared_ptr for sensor data which can be used in serveral callbacks 62/65162/1
authorkibak.yoon <kibak.yoon@samsung.com>
Thu, 7 Apr 2016 13:48:12 +0000 (22:48 +0900)
committerkibak.yoon <kibak.yoon@samsung.com>
Thu, 7 Apr 2016 13:48:12 +0000 (22:48 +0900)
commit6c58c34835cb8616ea61c99129ad3876889fd5d5
tree507e7959fb77decdcf60927e3e6e51b5dfcc5b46
parent3e7d2e37cd833adc6f0f6700167661c975ea2453
sensord: use shared_ptr for sensor data which can be used in serveral callbacks

* if app uses 2 more listener with the same sensor, then callback is called twice
  with the same sensor data. but in that case, because the first
  callback wrapper releases the data memory, second callback uses this
  data and even releases the memory which is already released. and it
  makes the crash.
* so in order to fix it, shared_ptr is used.

Change-Id: I48af5f35a55738d3a7469ab2fa6225e64e39cb71
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
src/client/sensor_event_listener.cpp
src/client/sensor_event_listener.h