🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #1171

Memory in MTS Objects using ADO

#1171
From: Jim Lesure
Date: Sat, 11 Mar 2000 00:00
26 lines
1805 bytes
A little background info...

I use cbuilder4 to build MTS objects that access SQLServer 7.0 databases via
ADO and stored procedures. These are stateless objects that if a record set
is returned (using a server side cursor) from the stored proc I use
recordset->GetRows() to fill a variant array output param.

All ADO objects are accessed through the VTable interface. I create a
connection object and a command object since in most instances I need to
access output params. Here is my problem: Evertime I execute a command
(Command->Execute(...)) that returns a pointer to a record set I see the
MTX.EXE memory usage increase by 4K that never seems to be released.
However, the leak does not occur if there is no record set returned.

At the end I close the recordset and connection and call SetComplete. I
think that because these are "smart" pointers they destroy themselves when
they go out of scope and it is not my responsiblity to release them. However
nothing I do seems to eliminate this leak. I have tried using the dispatch
interface, releasing/unbinding objects, not calling GetRows()... nothing has
helped and mtx.exe just grows and grows.

If anyone can shed some light on this problem it would be greatly
appreciated.

Jim Lesure
Washington, DC
Technical Details
Message-ID: <8aeqaa$l6v7@bornews.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcd2b,a1e4dd67feb74908,start
X-Google-Attributes: gidfcd2b,public
From: "Jim Lesure" <jlesure@nospam.earthlink.net>
Subject: Memory in MTS Objects using ADO
Date: 2000/03/11
Message-ID: <8aeqaa$l6v7@bornews.borland.com>
X-Deja-AN: 596284161
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Newsgroups: borland.public.cppbuilder.database.multi-tier