Memory...issues

Tech-Archive recommends: Fix windows errors by optimizing your registry



I have a record set of roughly 1200 records. The logic flow is like this:

Dim ds As New DataSet
Dim da As New SqlDataAdapter("SELECT * FROM Fax_Queue", objConnection)
da.Fill(ds, "Queue")

Dim dr As DataRow
Dim rpt as FaxReport = New FaxReport


For Each dr In ds.Tables("Queue").Rows
rpt.listid = dr("List_ID")
rpt.Run(False)
Dim xTIFF As DataDynamics.ActiveReports.Export.TIFF.TiffExport = New
DataDynamics.ActiveReports.Export.Tiff.TiffExport

tiffPath = path & ".tiff"
xTIFF.Export(rpt.Document, tiffPath)
xTIFF.Dispose()
GC.Collect() ' ???

Dim del As New SqlCommand("DELETE FROM Tbl_Collection_Fax_Queue
WHERE Queue_ID = " & dr("Queue_ID"), objConnection)
objConnection.Open()
del.ExecuteNonQuery()
objConnection.Close()
Next


As this application progresses and the TIFF files are generated, the memory
consumed by this process increases to a point where it basically locks up.
How can I prevent this memory leak? Is there a logic problem or can I
forcibly release memory somehow? In my head this process should be
consuming roughly the same amount of memory consistently.

Thanks for any help you can offer,
James


.



Relevant Pages

  • Re: Very Slow reading excel data into an array (while opened in ne
    ... How can I read an excel file into memory without opening it? ... data array gets recycled each time it opens a new file so I don't have to ... Dim rowsMaster, colsMaster, lastCellMaster ...
    (microsoft.public.excel.programming)
  • Problems with calling avifil32.dll function in vb.net
    ... application which converts BMP Images to AVI. ... This function wants to receive a pointer to a pointer to an ... to a pointer to unmanaged memory. ... Dim oGC As GCHandle = GCHandle.Alloc ...
    (microsoft.public.vb.winapi.graphics)
  • Re: Memory management problem
    ... CDO is an optional component from your Outlook/Office cd that isn´t ... OL has known problems with a memory leak. ... Dim MyMailbox As Outlook.Folders ... Michael Bauer - MVP Outlook ...
    (microsoft.public.outlook.program_vba)
  • Re: Memory management problem
    ... CDO is an optional component from your Outlook/Office cd that isn´t ... OL has known problems with a memory leak. ... Dim MyMailbox As Outlook.Folders ... Michael Bauer - MVP Outlook ...
    (microsoft.public.outlook.program_vba)
  • RE: Access 2000 - Error #3426 on "AddNew" to RecordsetClone
    ... new record, you need an updatable record set, which a "Snapshot" is not. ... Source" specifically names the correct query. ... > Dim newxrecord As DAO.Recordset ... Because the data control is currently pointing to a NULL record ...
    (microsoft.public.access.modulesdaovba)