Replace Singleton<T>::get() with Singleton<T>::try_get and make it obsolete
authorAndrey Obraztsov <anob@fb.com>
Thu, 20 Aug 2015 02:18:36 +0000 (19:18 -0700)
committerfacebook-github-bot-4 <folly-bot@fb.com>
Thu, 20 Aug 2015 03:20:18 +0000 (20:20 -0700)
commite9a78a1865e8725cca62ea2c2a5b470193a8cdbe
tree095c198281e114d32bf5277a5ab5cead29cc2b4d
parent2f107c8a68fe63d9e27a0cb62348a6d3b3e4d27b
Replace Singleton<T>::get() with Singleton<T>::try_get and make it obsolete

Summary: BREAKING CHANGE! Deprecate Singleton::get() and replace it with Singleton::try_get() that return smart pointer that allows to manage lifetime of a reference and prevents it from being deleted if the reference is still in use

Reviewed By: @chipturner

Differential Revision: D2268791
folly/Singleton.h
folly/test/SingletonTest.cpp
folly/test/SingletonVaultCTest.cpp