here is why

來源: 2009-01-23 13:27:58 [舊帖] [給我悄悄話] 本文已被閱讀:

singleton object is on process heap. and it is a pattern that "created once, referenced many times" so your code doesn't need to do new/delete at all. one example is memory pool obj, connection pool obj, cache obj, etc.