Removing sample resource leaks.