How do I properly close a DuckDb database?

There is some discussion over here which may be useful to help with this issue
https://discourse.julialang.org/t/is-it-hard-to-support-julia-udfs-in-duckdb/118509/38?u