-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLiteAsyncConnection does not release database file #740
Comments
Sorry for the trouble. I haven't thought too hard around the semantics of Resetting the pool, but what you're trying to do look valid to me and I'd like to support it. Will have to dive into @ericsink's code to find out why the GC needs to run... |
I happen to run into this issue too. After resetting the pool, setting the connection instance to null and even forcing the GC to run like in @gentledepp example, I can't create a file stream (open mode, read only and read/write access) to the database (for copy/move). Even after 5 attempts with 200ms delay in between. I am running the version 1.3.2 though. |
I believe the cause was the read connection opened by the async connection. I have changed the code to fix it (tests pass). I will do a release today and ask that you test against that. Thanks! |
This has been fixed in 1.6. |
@bruzkovsky - we need to have a look at this! |
Hi!
I made a PR to support storing guids as blobs #739
When running the tests, I noticed, that the async tests fail - except of the very first one.
The exception that causes the UTs to fail is
Note, that I am running these tests with
USE_SQLITEPCL_RAW
it seems that everything is disposed correctly in the tests.
Then I found [this issue on stackoverflow] (https://stackoverflow.com/questions/8511901/system-data-sqlite-close-not-releasing-database-file) which sounded pretty similar.
Explanation:
So I tried out their solution, which is adding a call to "GC.Collect" in order to be able to delete the file.
This actually did the trick, however I am not sure in how to proceed...
@ericsink and @praeclarum:
The text was updated successfully, but these errors were encountered: