leaks Event classes on every sensor change callback
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
platform-api |
New
|
Undecided
|
Ricardo Mendoza |
Bug Description
./android/
but this never gets deleted, so this is a rather big memory leak (as at least on my device accelerometer events happen several times a second even when not moving it).
Ricardo and I quickly discussed how the API should behave -- whether Event* can potentially live forever and need an explicit _free() method (that would be new API), or whether the getters for Event* are only valid during the callback (on_*_event) and immediately freed. We both agreed that the latter is sufficient and much simpler (clients don't need to remember to free events every time).
So this needs some "delete ev;", and presumably this make_holder() stuff can go away entirely.
Changed in platform-api: | |
assignee: | nobody → Ricardo Mendoza (ricmm) |