drop cleanup_memory function