Fixed memory leak in example.