add a destroy function
Merge pull request #1 from guile2912/master

Added destroy function