473,548 Members | 2,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Count Of References on a object

Hi,

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

I am thinking of basing it on this.

http://aspalliance.com/1131_Understa...g_in_Microsoft...

Please help and TIA
Mar 6 '08 #1
3 1211
On Thu, 06 Mar 2008 13:31:40 -0800, parez <ps*****@gmail. comwrote:
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?
Mar 6 '08 #2
On Mar 6, 5:21 pm, "Peter Duniho" <NpOeStPe...@nn owslpianmk.com>
wrote:
On Thu, 06 Mar 2008 13:31:40 -0800, parez <psaw...@gmail. comwrote:
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?
---- 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?
Mar 6 '08 #3
parez wrote:
On Mar 6, 5:21 pm, "Peter Duniho" <NpOeStPe...@nn owslpianmk.com>
wrote:
>On Thu, 06 Mar 2008 13:31:40 -0800, parez <psaw...@gmail. comwrote:
>>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?

---- 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
Mar 7 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1451
by: jsnX | last post by:
hi, i would like to make some code that operates on sets of points - does convex hulls and other operations. but it looks like i will need a lot of pointless object copies: ====================================================================================== // point cloud class class pc : public std::vector<vec2d> {
3
2525
by: Jay | last post by:
Using a custom mda file that holds the code for the login sequence for multiple Access 2000 databases. The problem occurs when the reference path is changed to a UNC path. This happens when maintenance is performed on the databases, the path changes from a drive letter to the UNC path. Users to not have access to this path. Is there a way...
5
1529
by: ken | last post by:
Hi, I'm using a reference dll file for my database. Its FEBE so the front ends need to have the reference. How can I have the front end automatically detect the reference if its in the same directory as the database? or can this be done? Otherwise how do people work with references and front ends...
4
16280
by: Fabrizio | last post by:
Hi I cannot figure why it isn't possible to cast a struct array to an object array. I written a structure like this: public struct Test { private int TestA; private int TestB;
35
2094
by: MuZZy | last post by:
Hi All, I got a issue here and hope someone can help me: Let's consider this code: // =================== CODE START ================================= using System; using System.Data; namespace TestNamespace {
7
11922
by: Martin Robins | last post by:
I am currently looking to be able to read information from Active Directory into a data warehouse using a C# solution. I have been able to access the active directory, and I have been able to return "DirectoryEntry" objects within the path that I specify (either using the DirectoryEnrtry.Children or using the DirectorySearcher class) and all...
5
2503
by: Michael Moreno | last post by:
Hello, In a class I have this code: public object Obj; If Obj is a COM object I would like to call in the Dispose() method the following code: System.Runtime.InteropServices.Marshal.ReleaseComObject(Obj);
2
1768
by: Alan Foxmore | last post by:
Hi Everyone, I'm new to ASP.NET so maybe this is easy. I'm using ASP.NET 2.0. I'm finding that the Application object (the HttpApplicationState object) is allowing me to add the same key multiple times. The easiest way to describe the problem is to just show you. In my Page_Load() I have this code:
0
722
by: Robert Schneider | last post by:
I would like to find out if an object A is accessible from object B. But consider indirections as well. So object B might access oject C and object C references object D through a collection (what would actually be object E) that finally references object A. Do you know of any simple and dynamic/scalable solution? Since the classes with...
2
5181
by: cendter | last post by:
Hi there, I am utterly confused - I have a form that starts an instance from excel and let's the user select a range. I then want to take this range as an array of doubles. I ran into trouble because the 1-based indexing that Excel passes (I think) so after many tries I got: Excel.Range aRange =...
0
7518
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7444
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7711
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7954
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7467
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6039
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5367
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
1932
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
755
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.