Article View: borland.public.cppbuilder.database.multi-tier
Article #396Memory Leaks in TClientDataSet/TSocketConnection
From: Rob Golding, OthelloTech.net
Date: Tue, 09 Apr 2002 17:13
Date: Tue, 09 Apr 2002 17:13
48 lines
2616 bytes
2616 bytes
I have been exeriencing a number of memory leaks/codeguard errors in a
Builder Database App. I have managed to get a very short example to
fail every time ... Real rocket science stuff ;0)
4 buttons on a form, a socket connection to 127.0.0.1, a client
dataset to *ANY* exported dataset, a midas server app
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
SocketConnection1->Open();
}
void __fastcall TForm1::Button2Click(TObject *Sender)
{
ClientDataSet1->Open() ;
}
void __fastcall TForm1::Button3Click(TObject *Sender)
{
ClientDataSet1->Close() ;
}
void __fastcall TForm1::Button4Click(TObject *Sender)
{
SocketConnection1->Close() ;
}
see I said it was rocket-science level !
ok, without the midas app server running ...
1)start my test application and close program - all ok
2)start my test application, click button1 to connect to the midas
server - which starts up, CPU window opens debuggng ntdll.dll ?!? and
close program - all ok
3)start my test application, click button1 to connect to the midas
server - click button 4 to close midas server and close program - all
ok
4)start my test application, click button1 to connect to the midas
server, then button2 to make CDS active (have tried both Open() and
Active=true - now no matter what i do, at the final close of the
program, I have lost 200 bytes with "The memory block (address) was
never freed, 0xEEEEEEEEEE, 200 bytes was aloocated with SysGetMem
I *cannot* believe that I am the only one experiencing this behaviour
- anyone found a fix/workaround/mystical communication from TeamB or
Borland about it ?
TIA
Rob
--
mailto:rob at critbank dot com
Technical Details
Message-ID:
<dfdec56b.0204090913.5d3011b6@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcd2b,a78c5201c6428268,start X-Google-Attributes: gidfcd2b,public X-Google-ArrivalTime: 2002-04-09 10:13:51 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail From: rob.golding@othellotech.net (Rob Golding, OthelloTech.net) Newsgroups: borland.public.cppbuilder.database.multi-tier Subject: Memory Leaks in TClientDataSet/TSocketConnection Date: 9 Apr 2002 10:13:50 -0700 Organization: http://groups.google.com/ Lines: 48 Message-ID: <dfdec56b.0204090913.5d3011b6@posting.google.com> NNTP-Posting-Host: 62.49.148.78 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1018372431 19247 127.0.0.1 (9 Apr 2002 17:13:51 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 9 Apr 2002 17:13:51 GMT