Git Product home page Git Product logo

Comments (10)

npurushe avatar npurushe commented on August 25, 2024

When do you close your Cursors or are you relying on the finalizer to close them?

from sqlite-android.

molikto avatar molikto commented on August 25, 2024

I always read the data then explicitly close the cursor asap. This is possibly a problem in SQLite Android Binding. But I have no time to get a minimal test case now....

from sqlite-android.

npurushe avatar npurushe commented on August 25, 2024

Please try the 3.12.1-1 version

from sqlite-android.

molikto avatar molikto commented on August 25, 2024

@npurushe OOM is gone

from sqlite-android.

npurushe avatar npurushe commented on August 25, 2024

Great! thanks for reporting

from sqlite-android.

molikto avatar molikto commented on August 25, 2024

Hello. I can still reproduce this in certain phones...Galaxy Note3, Android 5.0

from sqlite-android.

npurushe avatar npurushe commented on August 25, 2024

Do you get any warnings in your adb log from the SQLite tag (or anything with the message A resource was acquired at attached stack trace but never released) ? Is it only on Android 5.0?

from sqlite-android.

molikto avatar molikto commented on August 25, 2024

@npurushe no, there is none. but the native dirty memory will increase to around 60 mb. I can only reproduce it in one Android 5.0 phone, a Galaxy Note 3, with a Samsung custom Android 5.0. This is very wired to me, as the whole sqlite subsystem is in this project and shouldn't be platform dependent. Or it is not a real memory leak, but maybe it is because on that phone the memory constraint is different and this project doesn't meet the constraint but the system one meet.

from sqlite-android.

molikto avatar molikto commented on August 25, 2024

@npurushe just read your README.md about the read performance. So this project allocate memory differently compared to "SQLite Android Binding" project and Android embedded SQLite? Please reopen this issue because I am sure it still exists..

OK. after read the AOSP code and your code, seems the issue is AOSP create memory in ashmem but your code create memory in app heap... So I will see if I can make memory allocation smaller

from sqlite-android.

npurushe avatar npurushe commented on August 25, 2024

Yes that is the primary difference. I looked at the CursorWindow allocations and everything that was allocated was freed in all tests, so are you sure there is an issue there? How many cursors do you have open while running your program?

from sqlite-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.