ADO - permanent memory leak?!

From: Michal R (michal_at_topindex.cz)
Date: 10/22/04


Date: Fri, 22 Oct 2004 13:16:18 +0200

Can somebode help me with ADO memory leaks?!

Problem is in a few memory object which stays in memory - detected by
MemProof:

1677 SysString 00168894 15
SysAllocStringLen(ISAUTOINCREMENT,15)
1709 SysString 00168894 15
SysAllocStringLen(ISAUTOINCREMENT,15)
1716 SysString 00168894 15
SysAllocStringLen(ISAUTOINCREMENT,15)
1723 SysString 00168894 15
SysAllocStringLen(ISAUTOINCREMENT,15)

Source module is oleaut32.dll.

When followed simple code is called in a loop, used memory by application is
still growing till...:(

A'm using D7 Prof with SP 1, Win XP and data provider is
Microsoft.Jet.OLEDB.4.0 (Access DB).
I also have tried with ODBC provider and MySQL server and problem is the
same. The only one difference is in
memory object which stays in memory (for access 22, for odbc/mysql 13).

Thanks for help, Michal R.

A have used this simple code:
------------------------------------------
procedure TForm1.specproc;
var q:TADOQuery;
begin
   q:=TADOQuery.Create(nil);
   try
      q.SQL.Clear;
      q.Connection:=ADOConnection1;
      q.SQL.add('select * from mon');
      q.Active:=true;

      {....}

      q.Active:=false;
   finally
      q.Free;
   end;
end;



Relevant Pages

  • Re: Thou shalt have no other gods before the ANSI C standard
    ... Buffer overruns can still be problematic even if they only give ... > can be used to write outside the memory object that it points into. ... > have too many false positives). ...
    (sci.crypt)
  • RE: checking and improving performance
    ... Handles - maps to the Process Object, Handle Count counter, Instance - ... Total - maps to Memory Object, ... PLEASE NOTE the newsgroup SECURE CODE and PASSWORD were ...
    (microsoft.public.windows.server.sbs)
  • Re: WDF memory object operation between bus and child driver
    ... Upper driver (child) issue a request to its bus driver. ... Bus driver allocate WDF memory and record the ... Child hadle the memory object in its completion routine and free ...
    (microsoft.public.development.device.drivers)
  • Re: What is the best strategy to retrieve data from video driver? I am getting blue screen
    ... "A memory-mapped file backed by the paging file is a common technique used for sharing memory among user processes. ... a driver can create a named memory object and one or more user applications can open the same object by using OpenFileMapping and then calling the MapViewOfFile function to get a pointer to a section or all of the shared memory. ...
    (microsoft.public.development.device.drivers)
  • Re: WDF memory object operation between bus and child driver
    ... Upper driver (child) issue a request to its bus driver. ... Bus driver allocate WDF memory and record the ... Child hadle the memory object in its completion routine and free ...
    (microsoft.public.development.device.drivers)