Closing a session and release memory

Hi everybody,

I developed a program which starts an NX session in batch, loads a file, exports some data and then closes it.
However, when closing the file, the memory is not released and I can't find a method to close the session either so I don't know
how to free the memory and I really need to do that because in some cases it grows up too much and I can't continue the execution of my program.

Here it is the code I use to close documents

session.Parts.CloseAll(NXOpen.BasePart.CloseModified.CloseModified, Nothing)

where

session = NXOpen.Session.GetSession

Do you have any idea?
Thank you!

Silvia

If you are using a .net language then the memory your code uses is managed for you. NX is responsible for managing the memory it uses; I'm not sure it is possible to control NX's memory management from your application.

If memory use becomes an issue, perhaps your "manager" script can close and reopen NX occasionally. Closing NX should free the memory it is currently using.