Delete NotesMimeEntity from Memory

Hi to all,I have realized a routine that read from my filesystem the .EML file export from another mail-system and render this EML file and create the documents in a mail Db.

I must elaborate over 100.000 file EML…

So that for create this documents I use in a Forall cicle the object “NotesMimeEntity” that create child etc…

I have the suspect that when I assign a variable :

set body=doc.createmimeentity

in a cycle Forall – this allocate memory that don’t release…

(leek problem?)

I have try to insert a code :

→ Delete body <—

But this generate an error, how if body isn’t a abject…why?

I have try to use :

body.remove

but after that I use “doc.save(true,true)”…seem that the body variable don’t exist…

Can someone help me to understand?

This is a sample of my code so that you can undestand :


Forall Filename In Filelist

	conta=conta+1

	

	Set doc=db.createdocument

	session.ConvertMIME = False 

	Set body = doc.CreateMIMEEntity	

	Set parser=New MimeParser(body,filename)

	Call doc.ReplaceItemValue("Form", "Memo")

	If parser.receive() Then

		Call doc.Save(True, True)

                    Delete Body 'DON'T WORK!

                    Delete doc

                    



	Else

		Delete doc

                    Print "Mime 1.0 not valid!"

	End If

	Delete parser

	session.ConvertMIME = True



End Forall

The parser is a Class that I write for render the EML file that I pass how argument…

Tnx

Subject: Delete NotesMimeEntity from Memory

Hi Daniele,

I’m not too familiar with NotesMIMEEntities, but I know that the odbject becomes invalid as you save the corresponding doc. So you can’t delete your NotesMIMEEntity afterwards.

Maybe using the CloseMIMEEntity method of the NotesDocument class (before the doc is saved) solves your memory problems.

Greets,

Marco

Subject: RE: Delete NotesMimeEntity from Memory

yes…I have try this…but the result it’s same…

But I don’t know because on AIX system the memory go up…

If I monitoring the same agent in Windows Environment …the consume of memory are low…

I don’t understand why…

Subject: Delete NotesMimeEntity from Memory

Did you ever get to the bottom of that problem and would you be able to post updated code ?

B