Alright, I went with the first option. Only thing I needed to change from
what you had is add dispose() at the end of doClose().

Thanks,
Sam