🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.multi-tier
1 messages
1 total messages Started by Jim Lesure Sat, 11 Mar 2000 00:00
Memory in MTS Objects using ADO
#1171
Author: 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
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