Merge lp:~albaguirre/platform-api/fix-1206146 into lp:platform-api
Proposed by
Alberto Aguirre
Status: | Merged |
---|---|
Approved by: | kevin gunn |
Approved revision: | 264 |
Merged at revision: | 269 |
Proposed branch: | lp:~albaguirre/platform-api/fix-1206146 |
Merge into: | lp:platform-api |
Diff against target: |
345 lines (+43/-77) 2 files modified
android/default/default_ubuntu_application_sensor.cpp (+39/-57) android/include/private/application/sensors/events.h (+4/-20) |
To merge this branch: | bzr merge lp:~albaguirre/platform-api/fix-1206146 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Thomas Voß (community) | Approve | ||
PS Jenkins bot | continuous-integration | Approve | |
Review via email: mp+235066@code.launchpad.net |
Commit message
Fix memory leak on sensor event notifications (LP: #1206146)
Description of the change
Fix memory leak on sensor event notifications (LP: #1206146)
The object instantiated by make_holder was leaked.
I did not see why two heap allocations and a copy where needed for an object whose lifetime is only the duration of the notification callback.
The callback receives an opaque pointer to such object and no api is provided to delete the event object provided.
So I've opted to just make a stack allocation.
To post a comment you must log in.
PASSED: Continuous integration, rev:264 jenkins. qa.ubuntu. com/job/ platform- api-ci/ 368/ jenkins. qa.ubuntu. com/job/ platform- api-utopic- amd64-ci/ 101 jenkins. qa.ubuntu. com/job/ platform- api-utopic- armhf-ci/ 101 jenkins. qa.ubuntu. com/job/ platform- api-utopic- armhf-ci/ 101/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ platform- api-utopic- i386-ci/ 101
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/platform- api-ci/ 368/rebuild
http://