Add method to close resource.
Add method to close resource.