On DBreeze engine disposal and files corruption

Nov 28, 2014 at 10:18 AM
Edited Nov 28, 2014 at 10:18 AM
Dear DBreezers,
we're considering DBreeze as embedded database for our application, but we're concerned about engine disposal and possible file corruption.

Reading the documentation, it seems necessary calling "engine.Dispose()" to safely release the DB.
Our application is a service that is always alive and reads/writes on the database unless some critical error happens. Therefore, is basically impossible to call dispose when we don't need the engine anymore, since we don't know when this happens (and if it happpens). Also, adopting "using" pattern is also impractical since we create a single(ton) engine instance to be used for the whole process life.

So, essentially we will never call the dispose : can this cause some problems in case of unexpected process crash (e.g. corruption of the DB files etc.) ?

Thanks in advance,

Nov 28, 2014 at 10:28 AM
Hi, Marco

Engine.Dispose() is "good" to call if you stop your application, but it's absolutely not necessary.
Your app/service can be stopped violently and nothing should happen with your data and transactions.

Internally we have the same scenarios like you.
Nov 28, 2014 at 10:47 AM
Very good !

Thanks a lot for the information and for your work on this project :)