๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.dbexpress
1 messages
1 total messages Started by mr Thu, 16 Dec 2004 13:39
Increasing memory at TClientDataSet / midas.dll
#124
Author: mr
Date: Thu, 16 Dec 2004 13:39
48 lines
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);
}
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads