On 2011-11-19 23:48, lists.secondlife....@trap.wereanimal.net wrote: > Hi all. > > In the LLSingleton header, there is a comment: > > // Reference version of getInstance() > // Preferred over getInstance() as it disallows checking for NULL > > My question is, is there a difference between > MyClass::instance()->someFunction(); and > MyClass::getInstance()->someFunction(); ? > > If not, is there a preference of using one over the other? > > Linden Lab viewer code has about 35% ::instance use vs. > 65% ::getInstance use.
instance() is preferred, but newer, and we haven't spent the time to convert all existing code. _______________________________________________ Policies and (un)subscribe information available here: http://wiki.secondlife.com/wiki/OpenSource-Dev Please read the policies before posting to keep unmoderated posting privileges