minor
add an is_closed flag
force gc collect on context close.