473,473 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Garbage collector help.

Hi all

i am having two application which are using database connectivity.

In both the application i am filling one large table of database into
dataset.

When i run first application it will fill table into dataset and
display me proper count of rows.

Now i started second application, where again i am filling dataset.

When i run second appication, i noticed that to get memory for second
application memoy of first application is releasing which i don't want.

What i want is if forsecond application memoyr is not available it
shold not release memory of first application because it will cause
major problem for me.

Because on first application after some time i want to use rows of
that dataset which is not possible if i run second app.

First app will start giving me error 'object reference not set'. means
after running second app, the dataset of first app becoming null whihc
i don't want.

can some one help me why this is happening and exact role of garbage
collector in this case.
Please help me as i am completely stuck on this.

thanks in advance.

Nov 21 '05 #1
2 1361
See inline

Willy.

<tr**************@yahoo.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Hi all

i am having two application which are using database connectivity.

In both the application i am filling one large table of database into
dataset.

How large?? how many rows in the tables size of the rows etc..
When i run first application it will fill table into dataset and
display me proper count of rows.

Now i started second application, where again i am filling dataset.

Same question: see above.
When i run second appication, i noticed that to get memory for second
application memoy of first application is releasing which i don't want.

What i want is if forsecond application memoyr is not available it
shold not release memory of first application because it will cause
major problem for me.

Well don't run the second application then, there is nothing you can do
about it else than adding memory to your system or reduce your memory needs.
Because on first application after some time i want to use rows of
that dataset which is not possible if i run second app.

First app will start giving me error 'object reference not set'. means
after running second app, the dataset of first app becoming null whihc
i don't want.

This smell like a bug, running both at the same time can only slow down the
whole system when there is lack of memory but your managed objects (for
both) should remain valid/accessible albeit SLOW!!!.
can some one help me why this is happening and exact role of garbage
collector in this case.

The GC has nothing to do with this (see my reply on one of your other
postings), you seems to forget that memory is a shared (and scarse)
resource, you should handle it with care and watch your consumption. Dataset
have a large overhead, just like Datatables you should consider this in your
design.

Please help me as i am completely stuck on this.

thanks in advance.

Nov 21 '05 #2
Hi,

I think you have a simple bug, you are calling a method or property of an
instance without instantiate it first.

How big is your dataset? if too big then it would be better to just read
chunk of it. if for some reason you need all of it in memory you could
create a web service that will host the data ( and methods ) and will be
shared by both apps.


cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
<tr**************@yahoo.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Hi all

i am having two application which are using database connectivity.

In both the application i am filling one large table of database into
dataset.

When i run first application it will fill table into dataset and
display me proper count of rows.

Now i started second application, where again i am filling dataset.

When i run second appication, i noticed that to get memory for second
application memoy of first application is releasing which i don't want.

What i want is if forsecond application memoyr is not available it
shold not release memory of first application because it will cause
major problem for me.

Because on first application after some time i want to use rows of
that dataset which is not possible if i run second app.

First app will start giving me error 'object reference not set'. means
after running second app, the dataset of first app becoming null whihc
i don't want.

can some one help me why this is happening and exact role of garbage
collector in this case.
Please help me as i am completely stuck on this.

thanks in advance.

Nov 21 '05 #3

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

Similar topics

10
by: pachanga | last post by:
The Hans-Boehm garbage collector can be successfully used with C and C++, but not yet a standard for C++.. Is there talks about Garbage Collector to become in the C++ standard?
18
by: Rein Petersen | last post by:
Is there any way to adjust thread priority for the garbage collector? Would be nice if I could tune the thread priority rules for the garbage collector too... From my readings of the process,...
4
by: IcedCrow | last post by:
I know I read everywhere that you "can't" force the garbage collector to run, and that you really have no control when it runs. However as a programmer I know that there is always a way around...
18
by: Larry Herbinaux | last post by:
I'm having issues with garbage collection with my long-standing service process. If you could review and point me in the right direction it would be of great help. If there are any helpful...
13
by: Mingnan G. | last post by:
Hello everyone. I have written a garbage collector for standard C++ application. It has following main features. 1) Deterministic Finalization Providing deterministic finalization, the system...
28
by: Goalie_Ca | last post by:
I have been reading (or at least googling) about the potential addition of optional garbage collection to C++0x. There are numerous myths and whatnot with very little detailed information. Will...
142
by: jacob navia | last post by:
Abstract -------- Garbage collection is a method of managing memory by using a "collector" library. Periodically, or triggered by an allocation request, the collector looks for unused memory...
8
by: Paul.Lee.1971 | last post by:
Hi everyone, A program that I'm helping to code seems to slow down drastically during initialisation, and looking at the profiling graph, it seems to be the garbage collector thats slowing things...
350
by: Lloyd Bonafide | last post by:
I followed a link to James Kanze's web site in another thread and was surprised to read this comment by a link to a GC: "I can't imagine writing C++ without it" How many of you c.l.c++'ers use...
46
by: Carlo Milanesi | last post by:
Hello, traditionally, in C++, dynamically allocated memory has been managed explicitly by calling "delete" in the application code. Now, in addition to the standard library strings, containers,...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.