c++ - memory allocation for static singleton class object -


this question has answer here:

for below singleton class memory taken (stack or global memroy)

class singleton {     public:          static singleton* get()         {             static singleton instance;             return &instance;         } }; 

instance located in static storage (or global call it).


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -