Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

out of virtual memory

Status
Not open for further replies.

kris242

Programmer
May 21, 2001
4
US
I working on a VB application that works as a NT service. This application accesses another server to get the information. This is done by loading this data in to dynamic arrays. The first time it connects it loads this data and for every 2 hrs it refreshes the same data.

I am creating dynamic arrays and loading them with and for refresh I am "erase"ing them and loading them.

I donot know what happenns for every refresh the memory is piling and after some time I am getting a system message "Out of virtual memory" . Can any one please help me, is there any way in vb to handle dynamic arrays and release memory afte
 
If ERASE array "ain't" making it and you are going to reuse the array anyway, just use Redim array(newbound). What is in the array elements, strings, longs etc.? What version of VB and what SP. Latest is VB6 SP5.
 
It's VB6, SP5
Yep, I am doing the Redim on the same array. The array elements are of type object. iam doing "set" to Nothing
 
I doubt that it is the array then. Do you actually
Code:
For I = LBound(array) to UBound(array)
    Set array(I) = Nothing
Next
even though the Redim should have caused it. Do the objects have a separate QUIT method?
There is a "leak" in the object(s), maybe circular references?. Are the objects Recordsets with an open connection? etc. etc.
 
I do the FOR--NEXT to set all objects to nothing
thre are no sepearate QUIT methods. got to check on circular references.....


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top