close curl resource to free up ram