Article View: borland.public.cppbuilder.database.dbexpress
Article #124Increasing memory at TClientDataSet / midas.dll
From: mr
Date: Thu, 16 Dec 2004 13:39
Date: Thu, 16 Dec 2004 13:39
48 lines
2375 bytes
2375 bytes
Hello,
we use the TClientDataSets in an service application.
While running, we noticed a increasing memory for this service appliction.
We found out, that the increasing memory was allocated form the
TClientDataSets / Midas.dll.
To check this I made a small testapplication with datamodule.
The datamodule contains 4 ojects, SQLConnection, SQLDataSet,
DataSetProvider, ClientDataSet.
The app has 2 timer, one with 100msec intervall to simulate changes in the
dataset,
and one with 10Sec to call ApplayUpdates for writing the changes into the
database.
Please see the example code.
We tested a lot in the last days, but we have allways increasing memory.
I hope somebody have an idea for this problem.
Thanks.
Markus Rothh๏ฟฝft
void __fastcall TForm1::Timer100mSec(TObject *Sender)
{
// OnTimer Event Timerintervall 100mSec.
TClientDataSet *CDS;
CDS = DataModule_Test->ClientDataSet1;
CDS->First();
CDS->Edit();
int nCopyCnt = CDS->FieldByName("COPIES_PRINT")->AsInteger;
CDS->FieldByName("COPIES_PRINT")->AsInteger = nCopyCnt += 1;
AnsiString asMsg;
asMsg = IntToStr(nCounter) + " ";
asMsg += asMsg.StringOfChar('A', 1000);
CDS->FieldByName("BUFFER")->AsString = asMsg;
CDS->Post();
}
void __fastcall TForm1::Timer10Sec(TObject *Sender)
{
// OnTimer Event Timerintervall 10Sec.
TClientDataSet *CDS;
CDS = DataModule_Test->ClientDataSet1;
CDS->ApplyUpdates(-1);
}
Technical Details
Message-ID:
<41c18f81$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!transit.nntp.hccnet.nl!transit1.nntp.hccnet.nl!feeder1.cambrium.nl!feed.tweaknews.nl!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: fb4e2,db41802615478d31,start X-Google-Attributes: gidfb4e2,public X-Google-Language: ENGLISH,ASCII From: "mr@mse" <m.rothhoeft@msegmbh.de> Newsgroups: borland.public.cppbuilder.database.dbexpress Subject: Increasing memory at TClientDataSet / midas.dll Date: Thu, 16 Dec 2004 14:39:59 +0100 Lines: 50 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 80.143.13.160 Message-ID: <41c18f81$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1103204225 80.143.13.160 (16 Dec 2004 05:37:05 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!transit.nntp.hccnet.nl!transit1.nntp.hccnet.nl!feeder1.cambrium.nl!feed.tweaknews.nl!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail