473,698 Members | 2,360 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Object ?

WJ
I have a Database class that is responsible for performing DBIO to/from
Oracle RDBMS named "oraDBIOCla ss". It is c#. I have about 20 Asp.Net forms
(*.aspx) in my web site, their Url Links are located on a common launch pad
(graphic with hot spots), each calls different methods within the
oraDBIOClass.

Questions:

1. When an instance of "oraDBIOCla ss" is created, where is it placed in term
of memory (on the Heap, by the side or at the bottom of the heap or in the
heart of Intel CPU chip ?)

2. Each time a request is launched, an oraDBIOClass instance is created.

Example:
Webform1.aspx creates "oraDBIOCla ss ora1=new
oraDBIOClass() when it is clicked...
Webform2.aspx creates "oraDBIOCla ss ora2=new
oraDBIOClass() ...
Webform3.aspx creates "oraDBIOCla ss ora3=new
oraDBIOClass() ...

Then how does the system know that "ora1" instance is to be disposed of (how
does it know ?). I still think that "ora1" is still there with WebForm1.aspx
on the server ?

My understanding is this: My application does not know or cannot control
when the user clicks on a new link, therefore, it cannot free the current
instance named "ora1, 2 and or 3" ? Or I should not worry about it and let
the CLR takes care of it at runtime ?

Reason I ask because I need to worry about 100 concurrent accesses with
forms being clicked all over the place and soon the memory (4GB) runs out...

Thanks for your help,

John
Nov 18 '05 #1
2 1177
Hi,
The runtime probably uses reference counting to determine what objects can
be garbage collected. When an object cannot be traversed to via any object
graph it is elligible for garbage collection, and the runtime may dispose it
the next time gc runs.

"WJ" <Jo*******@HotM ail.Com> wrote in message
news:u$******** ********@TK2MSF TNGP11.phx.gbl. ..
I have a Database class that is responsible for performing DBIO to/from
Oracle RDBMS named "oraDBIOCla ss". It is c#. I have about 20 Asp.Net forms
(*.aspx) in my web site, their Url Links are located on a common launch pad (graphic with hot spots), each calls different methods within the
oraDBIOClass.

Questions:

1. When an instance of "oraDBIOCla ss" is created, where is it placed in term of memory (on the Heap, by the side or at the bottom of the heap or in the
heart of Intel CPU chip ?)

2. Each time a request is launched, an oraDBIOClass instance is created.

Example:
Webform1.aspx creates "oraDBIOCla ss ora1=new
oraDBIOClass() when it is clicked...
Webform2.aspx creates "oraDBIOCla ss ora2=new
oraDBIOClass() ...
Webform3.aspx creates "oraDBIOCla ss ora3=new
oraDBIOClass() ...

Then how does the system know that "ora1" instance is to be disposed of (how does it know ?). I still think that "ora1" is still there with WebForm1.aspx on the server ?

My understanding is this: My application does not know or cannot control
when the user clicks on a new link, therefore, it cannot free the current
instance named "ora1, 2 and or 3" ? Or I should not worry about it and let
the CLR takes care of it at runtime ?

Reason I ask because I need to worry about 100 concurrent accesses with
forms being clicked all over the place and soon the memory (4GB) runs out...
Thanks for your help,

John

Nov 18 '05 #2
> 1. When an instance of "oraDBIOCla ss" is created, where is it placed in
term
of memory (on the Heap, by the side or at the bottom of the heap or in the
heart of Intel CPU chip ?)
On the stack.
2. Each time a request is launched, an oraDBIOClass instance is created.

Example:
Webform1.aspx creates "oraDBIOCla ss ora1=new
oraDBIOClass() when it is clicked...
Webform2.aspx creates "oraDBIOCla ss ora2=new
oraDBIOClass() ...
Webform3.aspx creates "oraDBIOCla ss ora3=new
oraDBIOClass() ...

Then how does the system know that "ora1" instance is to be disposed of (how does it know ?). I still think that "ora1" is still there with WebForm1.aspx on the server ?
A WebForm class and its dependencies and dependents generally exist for a
matter of milliseconds, the amount of time between the receipt of an HTTP
Request for a Page, and the time the Response is sent. The client-side HTML
document exists, therefore, at a different time than the server-side
classes. Garbage Collection takes care of cleaning up the classes when the
Page goes out of scope (finishes processing).

A class instance is not a class, in a sense. It is a copy, or "instance" of
that class. When you create 3 instances of the same class, you are creating
3 separate objects, which do not have anything to do with one another.
My understanding is this: My application does not know or cannot control
when the user clicks on a new link, therefore, it cannot free the current
instance named "ora1, 2 and or 3" ? Or I should not worry about it and let
the CLR takes care of it at runtime ?
Reason I ask because I need to worry about 100 concurrent accesses with
forms being clicked all over the place and soon the memory (4GB) runs out...

It may be that your database class isn't closing its' Connections. Due to
the connected nature of a Connection, once established, it has 2
dependencies, one at each "end" of the Connection. If you don't close it, it
isn't released back into the Connection Pool, and even after the Page is
long gone, the Connection can be "orphaned" in memory. Make sure you
explictly close every Connection you open, ASAP.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"WJ" <Jo*******@HotM ail.Com> wrote in message
news:u$******** ******@TK2MSFTN GP11.phx.gbl... I have a Database class that is responsible for performing DBIO to/from
Oracle RDBMS named "oraDBIOCla ss". It is c#. I have about 20 Asp.Net forms
(*.aspx) in my web site, their Url Links are located on a common launch pad (graphic with hot spots), each calls different methods within the
oraDBIOClass.

Questions:

1. When an instance of "oraDBIOCla ss" is created, where is it placed in term of memory (on the Heap, by the side or at the bottom of the heap or in the
heart of Intel CPU chip ?)

2. Each time a request is launched, an oraDBIOClass instance is created.

Example:
Webform1.aspx creates "oraDBIOCla ss ora1=new
oraDBIOClass() when it is clicked...
Webform2.aspx creates "oraDBIOCla ss ora2=new
oraDBIOClass() ...
Webform3.aspx creates "oraDBIOCla ss ora3=new
oraDBIOClass() ...

Then how does the system know that "ora1" instance is to be disposed of (how does it know ?). I still think that "ora1" is still there with WebForm1.aspx on the server ?

My understanding is this: My application does not know or cannot control
when the user clicks on a new link, therefore, it cannot free the current
instance named "ora1, 2 and or 3" ? Or I should not worry about it and let
the CLR takes care of it at runtime ?

Reason I ask because I need to worry about 100 concurrent accesses with
forms being clicked all over the place and soon the memory (4GB) runs out...
Thanks for your help,

John

Nov 18 '05 #3

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

Similar topics

1
3224
by: Bijay Kumar | last post by:
Hi Guys, I was going through the source code of Object.cs in rotor. What I found is Equals() implemented as follows: public extern virtual bool Equals(Object obj); What I don't understand is:
28
20327
by: Daniel | last post by:
Hello =) I have an object which contains a method that should execute every x ms. I can use setInterval inside the object construct like this - self.setInterval('ObjectName.methodName()', this.pinginterval); - but is there no way to do this without using the literal ObjectName? If I write 'this.methodName()' I get "Line 1 Char 1: Object doesn't support this property or method." in IE, and nothing happens in Firebird.
9
8590
by: Keith Rowe | last post by:
Hello, I am trying to reference a Shockwave Flash Object on a vb code behind page in an ASP.NET project and I receive the following error: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). On the aspx page I have the object tag as follows:
11
9252
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in C++. I find my self sometimes, trying Object app = Object(); Object *app = Object(); Object app = new Object();
44
2442
by: Steven T. Hatton | last post by:
This may seem like such a simple question, I should be embarrassed to ask it. The FAQ says an object is "A region of storage with associated semantics." OK, what exactly is meant by "associated semantics"? What, if any, associated semantics are shared by all objects? That part seems to go beyond the FAQ. Does anybody know of a resource that discusses (focuses on) this topic? -- p->m == (*p).m == p.m
16
25411
by: sneill | last post by:
How is it possible to take the value of a variable (in this case, MODE_CREATE, MODE_UPDATE, etc) and use that as an object property name? In the following example I want 'oIcon' object to have the properties: mode1, mode2, and mode3. This seems simple but I can't quite figure it out... Any ideas anyone?
0
4628
by: Bijay Kumar | last post by:
Hi Guys, I was going through the source code of Object class (Object.cs in rotor). What I found is Equals() implemented as follows: public extern virtual bool Equals(Object obj); What I don't understand is:
26
5680
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized several parts of the DOM, but this does not include the window object. Thank you
3
2770
by: User1014 | last post by:
A global variable is really just a property of the "Global Object", so what does that make a function defined in the global context? A method of the Global Object? http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:Defining_Functions doesn't actually give any insight.
2
2653
by: Ralph | last post by:
Hi I don't understand why it's not working: function schedule(imTop){ this.tdImagesTop = imTop; } schedule.prototype.selectEl = function() { alert(this.tdImagesTop);
0
8678
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9166
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9030
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4621
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
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
3
2007
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.