for stateless object 1 should use, whether create singleton class or create object pool it. difference come between object pooling , singleton class? condition when can choose them on each other?
think around stateless object only.
when light weight objects not have internal state there can object pool. same fly weight pattern (gof). if object heavy , costly in terms of resource go singleton.
Comments
Post a Comment