Code

releasing fails to delete document, even when memory is scarce, so delete it explicitly