문제

I am using an embedded database file, on start up of my app, i will open the database file, only when the app exit, i close the database file, is it a best practice?

should i use it the traditional open-update-close fashion?

도움이 되었습니까?

해결책

There's nothing wrong with this approach as long as:

  • the database isn't shared
  • keeping an connection open does not require significant resources
  • you can safely release any allocated resources when your application crashes or terminates unexpectedly.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top