Revert "Remove defer from example."

This reverts commit daac38c17de91cec0ead0fc36fab9c10db7ed815.