bkyk8rc3zvpnsf5inmcqq4n3k98cv6hj-my-site-hyper-literate-git.test.suzanne.soy-0.0.1

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit ef294e47b423d342f4d915392912d291ec997503
parent e7d056b02dc82efdaa15625d9411be5bbb8f67f5
Author: Matthew Flatt <mflatt@racket-lang.org>
Date:   Tue, 27 May 2008 17:20:24 +0000

add and use close-eval to reduce memory use when rendering reference and guide

svn: r9981

original commit: 7ae0f500ae236de71c68feec7ea727818a3b6220

Diffstat:
Mcollects/scribble/eval.ss | 5+++++
Mcollects/scribblings/scribble/eval.scrbl | 7+++++++
2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/collects/scribble/eval.ss b/collects/scribble/eval.ss @@ -23,6 +23,7 @@ as-examples make-base-eval + close-eval scribble-eval-handler) @@ -244,6 +245,10 @@ [sandbox-eval-limits #f] [sandbox-make-inspector current-inspector]) (make-evaluator '(begin (require scheme/base))))) + + (define (close-eval e) + (kill-evaluator e) + "") (define (do-plain-eval ev s catching-exns?) (call-with-values (lambda () diff --git a/collects/scribblings/scribble/eval.scrbl b/collects/scribblings/scribble/eval.scrbl @@ -93,6 +93,13 @@ setting sandbox parameters to disable limits, set the outputs to @scheme['string], and not add extra security guards.} +@defproc[(close-eval [eval (any/c . -> . any)]) (one-of/c "")]{ + +Shuts down an evaluator produced by @scheme[make-base-eval]. Use +@scheme[close-eval] when garbage collection cannot otherwise reclaim +an evaluator (e.g., because it is defined in a module body).} + + @defparam[scribble-eval-handler handler ((any/c . -> . any) any/c boolean? . -> . any)]{