iPhone SQLite connection in domain object - close each time?
        Posted  
        
            by BahaiResearch.com
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by BahaiResearch.com
        
        
        
        Published on 2010-04-02T19:21:26Z
        Indexed on 
            2010/04/02
            19:23 UTC
        
        
        Read the original article
        Hit count: 296
        
I have what I would consider a small sized iPhone app that uses SQLite.
There is a singleton domain object which gets data from a SQLite database.
Is it better to create and open the SQLite connection for each request, or to open the DB once and hold on to it for the duration of the app.
The app's reason for being is the domain object so other objects will not need the DB.
© Stack Overflow or respective owner