On Mar 6, 5:21 pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
> > Hi,
>
[quoted text clipped - 3 lines]
> What was wrong with the reply you got last time you asked this exact same
> question? Why are you starting a whole new thread?
---- Previous reply-------
.NET prefers explicit Close/Dispose for its connection pools.
I think you should follow their example.
Arne
--------------
I really didnt understand..
Is he trying to say that objects in th pools must implement
IDisposable. and in my Dispose method inform the Object pool that this
object is available?
Jon Skeet [C# MVP] - 06 Mar 2008 23:22 GMT
> On Mar 6, 5:21 pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
> wrote:
[quoted text clipped - 13 lines]
> --------------
> I really didnt understand..
If you don't understand an answer, then it's worth saying so rather
than just repeating the question.
> Is he trying to say that objects in th pools must implement
> IDisposable. and in my Dispose method inform the Object pool that this
> object is available?
Yes. You can't get a reference count in .NET, partly because .NET
doesn't use reference counting.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
Arne Vajhøj - 07 Mar 2008 04:12 GMT
> On Mar 6, 5:21 pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
> wrote:
[quoted text clipped - 13 lines]
> IDisposable. and in my Dispose method inform the Object pool that this
> object is available?
There are other ways.
But doing it the way MS does .NET framework is probably objectively
good (because MS has spend time considering different solutions) and
definitely subjective good (because C# programmers are used to
the pattern).
Arne