Count Of References on a object

  • Thread starter Thread starter parez
  • Start date Start date
Hi,

I am trying to implement a pooling system Is there any way i can get
a count of references of an object.

What was wrong with the reply you got last time you asked this exact same
question? Why are you starting a whole new thread?
 
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
 
parez said:
---- Previous reply-------
.NET prefers explicit Close/Dispose for its connection pools.

I think you should follow their example.

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.
 
parez said:
---- Previous reply-------
.NET prefers explicit Close/Dispose for its connection pools.

I think you should follow their example.
--------------
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?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top