SQLBulkCopy memory leak..

A

Amar

Hi,
I need to insert a large amount of records pretty frequently through
my application. The quickest way to achive this seems to be
SQLBulkcopy class. I have implemented the solution using the bulkcopy
class and works quite well except for one problem.
It doesn seem to release the memory it uses. I have found that the
memory used increases quite rapidly when using this class, further
more the memory is not collected even when I close and dispose the
SQLBulkcopy instance.
I have verified this finding running the application after commenting
the SQLBulkcopy realated code, the memory utilization is normal. But
when I uncomment the SQLbulkcopy code, the issue arises.
please help.
 
M

Marc Gravell

Can we see any of the SqlBulkCopy code? In particular, I wonder if
you've hooked up some events (SqlRowsCopied, etc) in a way that is
keeping it alive...

Marc
 
I

Ignacio Machin ( .NET/ C# MVP )

Hi,
I need to insert a large amount of records pretty frequently through
my application. The quickest way to achive this seems to be
SQLBulkcopy class. I have implemented the solution using the bulkcopy
class  and works quite well except for one problem.
It doesn seem to release the memory it uses. I have found that the
memory used increases quite rapidly when using this class, further
more the memory is not collected even when I close and dispose the
SQLBulkcopy instance.
I have verified this finding running the application after commenting
the SQLBulkcopy realated code, the memory utilization is normal. But
when I uncomment the SQLbulkcopy code, the issue arises.
please help.

post some code. I have used it before and I have never found an issue
with memory consuption
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

SqlBulkCopy and transactions 0
SqlBulkcopy memory leak problem 1
Memory Leak 23
Memory leak using pInvoke 3
Symptoms of memory leak 1
Memory leak? 1
visual studio memory utilization? 7
Memory Leak Detection 4

Top