;;; -*-Scheme-*-
;;;
-;;; $Id: imail-core.scm,v 1.141 2001/06/03 01:22:31 cph Exp $
+;;; $Id: imail-core.scm,v 1.142 2001/06/03 01:42:28 cph Exp $
;;;
;;; Copyright (c) 1999-2001 Massachusetts Institute of Technology
;;;
(define (open-resource url)
(or (get-memoized-resource url)
- (memoize-resource (%open-resource url) close-resource)))
+ (memoize-resource (%open-resource url)
+ (lambda (resource) (close-resource resource #t)))))
(define-generic %open-resource (url))
;; -------------------------------------------------------------------
-;; Close RESOURCE, freeing up connections, memory, etc. Subsequent use
-;; of the resource must work, but may incur a significant time or space
-;; penalty. Optional argument NO-DEFER? means that the resource must
-;; be closed immediately, and not deferred.
+;; Close RESOURCE, freeing up connections, memory, etc. Subsequent
+;; use of the resource must work, but may incur a significant time or
+;; space penalty. NO-DEFER? means that the resource must be closed
+;; immediately, and not deferred.
-(define (close-resource resource #!optional no-defer?)
+(define (close-resource resource no-defer?)
(save-resource resource)
- (%close-resource resource (if (default-object? no-defer?) #f no-defer?)))
+ (%close-resource resource no-defer?))
(define-generic %close-resource (resource no-defer?))
;;; -*-Scheme-*-
;;;
-;;; $Id: imail-file.scm,v 1.76 2001/06/03 01:22:54 cph Exp $
+;;; $Id: imail-file.scm,v 1.77 2001/06/03 01:42:31 cph Exp $
;;;
;;; Copyright (c) 1999-2001 Massachusetts Institute of Technology
;;;
(call-with-input-xstring (file-folder-xstring folder) 0 reader)))))
\f
(define-method discard-folder-cache ((folder <file-folder>))
- (close-resource folder))
+ (close-resource folder #f))
(define-method probe-folder ((folder <file-folder>))
folder
;;; -*-Scheme-*-
;;;
-;;; $Id: imail-imap.scm,v 1.177 2001/06/03 01:39:30 cph Exp $
+;;; $Id: imail-imap.scm,v 1.178 2001/06/03 01:42:40 cph Exp $
;;;
;;; Copyright (c) 1999-2001 Massachusetts Institute of Technology
;;;
#f)
(define-method discard-folder-cache ((folder <imap-folder>))
- (close-resource folder)
+ (close-resource folder #f)
(reset-imap-folder! folder))
(define-method probe-folder ((folder <imap-folder>))
'OFFLINE))
(define-method disconnect-folder ((folder <imap-folder>))
- (close-resource folder))
+ (close-resource folder #f))
(define-method folder-supports-mime? ((folder <imap-folder>))
folder