MainActivity properly cleans up the resources it uses when it is destroyed.