Hand reverted memory -> tr1/memory change. XCode 5 does not have tr1. shared_ptr will be removed in near future to support more compilers.