NotesDocument: how to close?

Hi all,

I have the following problem: I use this LotusScript code to search, open and retrieve some information from all the mail databases from my server:

Dim dbricerca As NotesDatabase

Dim db As NotesDatabase

Set db = session.CurrentDatabase

Set db = dbdir.GetFirstDatabase(DATABASE)

While Not(db Is Nothing)

(CODE)

Set db = dbdir.GetNextDatabase

Wend

The problem is that the task “nlnotes.exe” starts from 63 Mb onto my PC and at the end of the execution is over 1,5 GB (in fact, its run over 2.500 db…)!!!

There is a way to do something like " Call db.close"?? Any suggestion?

Thanks to all in advance!!!

Subject: try this

set db=nothing

or

Delete db

normally this should free the memory at least for the db object.

did you check you CODE part?

maybe you are missing the reset some variables in there too?

hth

alex

Subject: It works!

Thank you very mych Alex, does it works!!!

Bye,

Maxx.

Subject: welcome :slight_smile: