close api clean-up example