context: use dispose since it makes more sense

Basically if there is an error some of those variables
might not be set so better check them before finalizing them.