| www.delorie.com/gnu/docs/guile/guile_283.html | search |
![]() Buy GNU books! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Whenever Guile performs a garbage collection, it calls the following hooks in the order shown.
scm_gc_running_p to 1, but before entering the GC critical
section.
If garbage collection is blocked because scm_block_gc is
non-zero, GC exits early soon after calling this hook, and no further
hooks will be called.
scm_after_gc_hook.)
All the C hooks listed here have type SCM_C_HOOK_NORMAL, are
initialized with hook closure data NULL, are are invoked by
scm_c_hook_run with call closure data NULL.
The Scheme hook after-gc-hook is particularly useful in
conjunction with guardians (see section 29.3 Guardians). Typically, if you are
using a guardian, you want to call the guardian after garbage collection
to see if any of the objects added to the guardian have been collected.
By adding a thunk that performs this call to after-gc-hook, you
can ensure that your guardian is tested after every garbage collection
cycle.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |