run .free and .ctx-free in .close