Re: Potential Memory Leak with DataSet ?
From: Cube (anonymous_at_discussions.microsoft.com)
Date: 05/27/04
- Next message: Y. Sivaram: "CF and Embedded Resources"
- Previous message: Bill Mitchell: "Re: All .NET Forms showing in Running Programs List"
- In reply to: William Ryan eMVP: "Re: Potential Memory Leak with DataSet ?"
- Next in thread: William Ryan eMVP: "Re: Potential Memory Leak with DataSet ?"
- Reply: William Ryan eMVP: "Re: Potential Memory Leak with DataSet ?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 27 May 2004 14:16:05 -0700
Thanks for the feedback,
To be honest my job is seriously on the line if I don't get this fixed and
it's getting me down :o( Any help is hugely welcome.
Some more info. on my problem ...
1. User Clicks Login and is Validated against database (username/pwd using SQLSelectCommand)
2. InitialiseApplication() is called which launches a worker thread that loads the
database into dataset (about 16,000 records), while the UI thread updates
a progress bar. Worked Thread sets a Global Boolean Flag to indicate when
it's finished, progress bar stops. Takes about 30 seconds.
3. RefreshDetails() is called which binds list boxes, etc.to the tables in the dataset.
The layout of my app is several panels containing these controls with show/hide
being used.
4. Person collects information moving from location to location. For each item the
user selects a record is inserted/updated in the appropriate table in the dataset.
5. On a periodic basis which does vary (some may do it twice a day, others once a
week) a synchronisation takes place. The database is updated from the dataset.
Once the database is updated, a connection is established to the SQL Server using
GPRS, all the ususal Merge Replication activity occurs and no conflicts are reported.
After the Sync a Worked Thread is created to load the database back up into
the dataset, while the UI thread updates a progress bar. The Worked Thread sets
a Global boolean to indicate this it's finished. User Controls are rebound as in step 3.
Problem...
I can't reproduce the error I'm getting consistenly as it seems to happen sporadically
and usually over a period of time. When the error does happen it seems that:
- Some of the data is not making it from the dataset to the CE database.
- When a sync occurs most of my user controls do not contain any items.
Question...
1. Is my use of threads messing things up? Maybe the dataset is being accessed by
different threads and that's screwing things up?
2. Is my dataset too large - 16,000 records (2MB) ?
3. Is my dataset being held in memory too long? User *closes* app (i.e. clicks on
X), which we know doesn't close it in the traditional sense, and opens it 2-3 days
later, before syncing. Maybe this ties in with Q1?
4. I came across this issue on MS KB and can confirm that I don't explicity call Dispose()
will it affect me? http://www.kbalertz.com/Feedback_824462.aspx
Any help is hugely appreciated.
- Next message: Y. Sivaram: "CF and Embedded Resources"
- Previous message: Bill Mitchell: "Re: All .NET Forms showing in Running Programs List"
- In reply to: William Ryan eMVP: "Re: Potential Memory Leak with DataSet ?"
- Next in thread: William Ryan eMVP: "Re: Potential Memory Leak with DataSet ?"
- Reply: William Ryan eMVP: "Re: Potential Memory Leak with DataSet ?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|