here is why

回答: use singletonncpga2009-01-23 12:54:34

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.

所有跟帖: 

thanks. u r real a guru! happy new yr! -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (0 bytes) () 01/23/2009 postreply 13:31:58

those are really basics -ncpga- 给 ncpga 发送悄悄话 (26 bytes) () 01/23/2009 postreply 13:56:49

haha, absolutely :) -戏雨飞鹰- 给 戏雨飞鹰 发送悄悄话 戏雨飞鹰 的博客首页 (0 bytes) () 01/23/2009 postreply 14:14:07

请您先登陆,再发跟帖!