Skip to content

Fix for CursorWindow leaking native memory #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 1, 2011
Merged

Fix for CursorWindow leaking native memory #22

merged 1 commit into from
Nov 1, 2011

Conversation

superfell
Copy link
Contributor

This change fixes the native memory leak when running cursors, there were 2 problems one is that the new CursorWindow was storing its Window * in the superclasses nWindow not in the new subclasses nWindow. This would cause android.database.CursorWindow to create a window, then the pointer to it was overrwritten by the info.guardianproject.database.CursorWindow newly created window.

The 2nd issue is that the clean-up did not call through to cleanup the parent class.

I've tested this on a Samsung Galaxy S running 2.2, A Galaxy S2 running 2.3, and a Galaxy Tab running 3.1.

One remaining weirdness is that the window created by android.database.CursorWindow is never used, it'd be nice if there was someway to not have to create that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants