Showing results for 
Search instead for 
Do you mean 
Reply

High memory consumption - java.lang.OutOfMemoryError

Hello all,

 

I'm coding on JAVA (NX CAM).

My program memory consumption is very high and I don't sure why. I hope you be able to assist me.

 

The program runs on several PRT files. For each file I activate "Find Features" and "Create Feature Process" API's and those methods consume a lot of memory. BUT, when they done, all the resources are free.

In the other hand, my part of the code doesn't free all the memory it uses, and therefore I get java.lang.OutOfMemoryError.

 

I use Builders, but I always "Destroy" them when they done.

I also use this objects: Operation, Feature, Face, Tool, GeometrySet, UFSession/
In the end of each PRT I perform:

m_WorkPart.close(nxopen.BasePart.CloseWholeTree.TRUE, nxopen.BasePart.CloseModified.USE_RESPONSES, null);


Thank you,

Tom.

1 REPLY

Re: High memory consumption - java.lang.OutOfMemoryError

Maybe after each file I need to close the session an open a new one?

 

This is how I open a seesion:

m_TheSession = server.session();

What is the API for closing it?