guardianproject/android-database-sqlcipher — pull request #22 by superfell (2011-10-31 23:12:03+00:00)
Title: Fix for CursorWindow leaking native memory

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.