Is your feature request related to a problem? Please describe.
For the past few days I have been trying to track down a memory leak in my Godot server. Eventually, I found an open_db() without an accompanying close_db(). This was causing a leak of around 1MB every 10 seconds or so in my code, since the call happened fairly frequently.
Describe the solution you'd like
When calling open_db() on an instance of gdsqlite where the db is already open, gdsqlite should:
Throw an error/warning to the console
Ignore the open_db command, since there is no reason that I know of to open_db() on an open database.
Describe alternatives you've considered
Step 2 could be omitted, but that would open up the possibility of the developer leaking memory.
Additional context
I am running a godot server on a Linux machine. There is complex SQLite usage over multiple DBs, and so I'm very conscious of avoiding errors and memory issues that may cause the server to misbehave long-term, which is how I caught issue 88.
Thanks!
Is your feature request related to a problem? Please describe. For the past few days I have been trying to track down a memory leak in my Godot server. Eventually, I found an open_db() without an accompanying close_db(). This was causing a leak of around 1MB every 10 seconds or so in my code, since the call happened fairly frequently.
Describe the solution you'd like When calling open_db() on an instance of gdsqlite where the db is already open, gdsqlite should:
Describe alternatives you've considered Step 2 could be omitted, but that would open up the possibility of the developer leaking memory.
Additional context I am running a godot server on a Linux machine. There is complex SQLite usage over multiple DBs, and so I'm very conscious of avoiding errors and memory issues that may cause the server to misbehave long-term, which is how I caught issue 88. Thanks!