Skip to main content
3 events
when toggle format what by license comment
Oct 19, 2011 at 16:28 comment added Jeremy @user10326 Yes exactly. I see opening a socket as part of instantiation overhead, if its the class's job to do that and it must be initialized in the constructor then the latency & IO impacts are what you are concerned with.
Oct 19, 2011 at 16:26 comment added user10326 Well now I don't know.Because even in this case you describe which (before reading this) I would definetely use pooling, I would also have overhead.1)New constructs to handle the pooling 2) Synchronization for the getting/releasing object from pool 3) maintaining pool etc. So I am now thinking that perhaps there is no use case that it is useful except e.g. caching a socket instead of opening a new one each time to connect to the server.And this case is because of network latency and not instantiation creation overhead
Oct 19, 2011 at 16:21 history answered Jeremy CC BY-SA 3.0