Merge lp:~dandrader/grail/start_times_growth into lp:grail

Proposed by Daniel d'Andrada
Status: Merged
Merged at revision: 196
Proposed branch: lp:~dandrader/grail/start_times_growth
Merge into: lp:grail
Diff against target: 11 lines (+1/-0)
1 file modified
src/v3/recognizer.cpp (+1/-0)
To merge this branch: bzr merge lp:~dandrader/grail/start_times_growth
Reviewer Review Type Date Requested Status
Stephen M. Webb (community) Approve
Review via email: mp+97418@code.launchpad.net

Description of the change

Erase ended touches from start_times_ map. Otherwise that map will keep growing indefinitely with every new touch for no good reason.

To post a comment you must log in.
Revision history for this message
Stephen M. Webb (bregma) wrote :

Fair enough.

Have you run valgrind on test cases to help identify any other leaks?

review: Approve
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

> Fair enough.
>
> Have you run valgrind on test cases to help identify any other leaks?

No, I didn't. I found that one by reading the code.

Revision history for this message
Chase Douglas (chasedouglas) wrote :

Valgrind is slow enough that the test cases don't recognize gestures properly. This was as of the last time I tried. Maybe now that everything is based on X server timestamps things will work correctly.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/v3/recognizer.cpp'
2--- src/v3/recognizer.cpp 2012-03-08 20:59:56 +0000
3+++ src/v3/recognizer.cpp 2012-03-14 15:00:27 +0000
4@@ -696,6 +696,7 @@
5 }
6
7 ERASE_TOUCH(touch_id, free_touches_);
8+ start_times_.erase(touch_id);
9
10 next_touch: ;
11 }

Subscribers

People subscribed via source and target branches