db: make sqlite connections managed by custodians

This commit is contained in:
Ryan Culpepper 2014-12-12 00:27:30 -05:00
parent 6039d6cc0b
commit 8f4575eeec

View File

@ -2,6 +2,7 @@
(require racket/class
ffi/unsafe
ffi/unsafe/atomic
ffi/unsafe/custodian
unstable/error
"../generic/interfaces.rkt"
"../generic/common.rkt"
@ -375,7 +376,7 @@
;; ----
(super-new)
(register-finalizer this
(register-finalizer-and-custodian-shutdown this
(lambda (obj)
;; Keep a reference to the class to keep all FFI callout objects
;; (eg, sqlite3_close) used by its methods from being finalized.