Displaying photo albums making memory leaks