🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #769

Re: Memory Leak

#769
From: James Peterson
Date: Fri, 08 Apr 2005 16:07
80 lines
3139 bytes
did you do a delete x; when you were done with your connection?
If you don't delete this when you close a window or application then yes you
will have a memory leak each time you create an instance of your
TADOConnection.
"Roberto" <roberto@dialtech.com.br> wrote in message
news:419351d6$1@newsgroups.borland.com...
> Well,
>
> First of, I�m using BCB 5.0 Ent, W2000.
>
> I have a multithreaded software (aprox 150 threads) and one TADOConnection
> for each thread.
>
> TADOConnection *x[190];
>
> x = new TADOConnection(NULL);
>
> This array remains until the software stops.
>
> If I create one connection in design time (placing the component on the
> form), the leak appears don�t occur. But the conns cannot handle the high
> trafic of information.
>
> When I run the software in debug mode, step by step, I see the "new"
working
> and the memory grows but when the delete is called, the memory is not
> released.
>
>
> Question, when I create a String variable, I have to free this variable
too
> when the funcion terminates ??
>
> Ex:
>
> String x;
>
> x = "Test";
>
> SysFreeString(x);
>
>
> Thanks,
>
> Roberto.
>
>
> "Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message
> news:41930ae4@newsgroups.borland.com...
> > How do you detect that memory is allocated?
> >
> > file://------------------------------------------
> > Regards,
> > Vassiliev V. V.
> > http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
> > ADO.Net
> > http://www.oledbdirect.com - The fastest way to access MS SQL Server,
> > MS Jet (Access) and Interbase (through OLEDB)
> >
> > "Roberto" <roberto@dialtech.com.br> �������/�������� � ��������
���������:
> > news:4192ea2e$1@newsgroups.borland.com...
> > > Friends,
> > >
> > > We are having serious trouble with ADO.
> > >
> > > Seems that after any small or huge query (Using TADOQuery dinamically
> > > created) memory remains allocated even after the "delete" command.
> > >
> > > Can anyone help ?
> > >
> > > thanks
> > >
> > > Roberto
> > >
> > >
> >
> >
>
>
Technical Details
Message-ID: <4256ac31@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!nntp.abs.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4192ea2e$1@newsgroups.borland.com> <41930ae4@newsgroups.borland.com> <419351d6$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,995d05ed431e005b
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII
From: "James Peterson" <jpeterson@romanmealmilling.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <4192ea2e$1@newsgroups.borland.com> <41930ae4@newsgroups.borland.com> <419351d6$1@newsgroups.borland.com>
Subject: Re: Memory Leak
Date: Fri, 8 Apr 2005 11:07:14 -0500
Lines: 82
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 64.21.236.129
Message-ID: <4256ac31@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1112976433 64.21.236.129 (8 Apr 2005 09:07:13 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!nntp.abs.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail