SQLBulkCopy memory leak..

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Amar

    SQLBulkCopy memory leak..

    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.
  • Marc Gravell

    #2
    Re: SQLBulkCopy memory leak..

    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

    Comment

    • Ignacio Machin ( .NET/ C# MVP )

      #3
      Re: SQLBulkCopy memory leak..

      On Aug 25, 5:17 am, Amar <amarjeetlokha. ..@gmail.comwro te:
      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

      Comment

      Working...