[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Jim Love

11/20/2002 6:03:00 PM

I don't know why I never noticed this before, but my .net applications are
eating a huge amount of memory. I'm not talking about a memory leak where my
memory keeps increasing over time. I'm talking about an application that
runs through its startup and then sits at about 20MEGS!! Once started, it
does not seem to increase over time. I think that I am not releasing some
objects I use at startup properly. I use:

''''''''''''''THIS USES 5 MEGS
Public Function PrevInstance() As Boolean
''return true if previous instance
If
UBound(Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrent
Process.ProcessName)) > 0 Then
Return True
Else
Return False
End If
End Function

'''''''''''''read config file from xml THIS USES 2 MEGS
Dim xmlr As XmlTextReader
Try
''READ XML TEXT FILE
xmlr = New XmlTextReader("config.xml")

While (xmlr.Read())
While (xmlr.MoveToNextAttribute())
''use values ''select attribute
End While ''move next
End While 'read
xmlr.Close()
Catch e As Exception
ReadXMLGetAppInfo = False
End Try
xmlr = Nothing
'''''''''''''''''''''''''''''''''''read from database once and fill local
memory class USES 5 MEGS
CN = New SqlClient.SqlConnection(ConnectString)
CN.Open()
CMD = New SqlClient.SqlCommand(strSQl, CN)
DA.SelectCommand = CMD
DA.Fill(DS)
''''''''
''I do this database work repeatedly throught out the program and usage
doesn't go up
''The rest of the executing code doesn't add memory usage either.


3 Answers

(Mike Clay (MSFT))

12/5/2002 9:45:00 PM

0

Hi Jim,

I realize this post is a little late , but I was going through a backlog of
issues and wanted to followup and see if you ever got this resolved.

Mike Clay, MCSD
Beta Technical Support


This posting is provided "AS IS" with no warranties, and confers no rights.
© 2002 Microsoft Corporation. All rights reserved.

Jim Love

12/5/2002 11:45:00 PM

0

No this was never resolved. Any information wil be helpful

"Mike Clay (MS)" <mclay@online.microsoft.com> wrote in message
news:6F#vY8JnCHA.1492@cpmsftngxa09...
> Hi Jim,
>
> I realize this post is a little late , but I was going through a backlog
of
> issues and wanted to followup and see if you ever got this resolved.
>
> Mike Clay, MCSD
> Beta Technical Support
>
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> © 2002 Microsoft Corporation. All rights reserved.
>


(Mike Clay (MSFT))

12/6/2002 8:18:00 PM

0

Based on your original post, it appears its only the XML code thats causing
the memory consumption. If this is correct, I'll try and see if I can
repro. Also, has this only been tested on one server ? I just want to be
sure its the code causing this and not some type of server configuration.

Mike Clay, MCSD
Beta Technical Support


This posting is provided "AS IS" with no warranties, and confers no rights.
© 2002 Microsoft Corporation. All rights reserved.