Re: Memory Utilization - WeOnlyDo Discussion board

Re: Memory Utilization (General questions)

by rien van ham, Tuesday, June 03, 2008, 13:05 (5815 days ago) @ woddrazen

Hi Drazen,

I did some extensive testing with my application and found the following:

I'm using the LISTDIR method.

It fires the DONE event which calls the PopulateTree method:
Private Sub objFTPOphalenNieuw_Done(ByVal ErrorCode As Long,
ByVal ErrorText As String)
PopulateTree objFTPOphalenNieuw.DirItems
End Sub

IF PopulateTree contains NO code:
Private Sub PopulateTree(ByVal Items As DirItems)
End Sub

NO memoryleak is present in the application.

But, if a put the following code in this method:
Private Sub PopulateTree(ByVal Items As DirItems)
Dim intTeller as Integer

For intTeller = 0 To Items.Count - 1
Next intTeller
End Sub

the application starts leaking memory:
at start it uses: 12.224 MB
after 1 min.: 14.552 MB
after 2 min.: 15.128 MB
after 3 min.: 15.648 MB
after 4 min.: 16.184 MB
etc.

==========================================================
Used FTP-server (on localhost): Serv-U 6.4.0.6
Files present in sourcedirectory: 429, 7 MB

The only thing my testapplication does at this moment is logging in at the server and getting the filelist.

Thanks a lot,

Rien van Ham


Complete thread: