home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 32,717 of 33,346   
   Balog Pal to Seungbeom Kim   
   Re: Singletons   
   10 Dec 12 20:13:57   
   
   From: pasa@lib.hu   
      
   On 11/30/2012 6:22 AM, Seungbeom Kim wrote:   
      
   > Can you give some real-world examples of the need for the initialization   
   > to be lazy, i.e. not earlier than the first use? My understanding is that   
   > when you think of singletons as global objects, you shouldn't mind their   
   > initialization being earlier than their first use.   
      
   Anything applies that during initialization connects to a remote   
   location, a database, opens a file, triggers loading a new DLL...   
      
   A very RL example: our application can load/import *.dwg files of   
   AutoCad. To do that you need the maker's RealDWG library, that is a ~180   
   Megs redistributable, loading most of itself during init.   
      
   My majority of clients that don't bother with DWG at all, or do it   
   rarely would be massively unhappy if I fired it up speculatively up   
   front, not only when a relevant request was made.   
      
      
   --   
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca