Add close() to all examples.