c++ - memory allocation for static singleton class object -
this question has answer here:
- where static variables stored (in c/c++)? 15 answers
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
Post a Comment