Groups | Blog | Home
all groups > sql server replication > july 2006 >

sql server replication : Memory leak ?? when calling Distribution ActiveX Controls


光头
7/20/2006 10:29:01 PM
I am doing a replication program for replicating SQL SERVER 2000's data to an
ODBC subscriber in pull mode using Microsft SQLDistribution ActiveX Control,
my code is like
/* initialization some properties of the SQLDistribution object */
hr = ::CoCreateInstance(CLSID_SQLDistribution, NULL, CLSCTX_INPROC_SERVER,
IID_ISQLDistribution, (LPVOID *) &pSQLDistribution);
pSQLDistribution->put_Publisher(bstrPublisher);
......

/*then ,loop to calling Run method, until recived exit signal*/
while ( !bToExit )
{
pSQLDistribution->Initialize();
pSQLDistribution->Run();
pSQLDistribution->Terminate();
Sleep(3000);
}

for clarity, i have ignored error-detect codes.


The program is functioning successfully, but I notice many memory leaks.
I am sure the leaking is not caused by other code in my program because I do
only run the codes in the loop.

Has anyone had known this program or any advice, please feel free to tell me.
Many Thanks!

Jacky.
jacky
7/20/2006 10:54:01 PM
I forgot to put:
SQL Server 2000 SP4 running on Windows 2003 Server.
--
I like computer!!!


[quoted text, click to view]
Hilary Cotter
7/21/2006 12:00:00 AM
after the program completes does available bytes jump back up to where it
was before you started it?

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

AddThis Social Bookmark Button