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.