Memory leak caused by JavaNew[...] (JLink package)
- To: mathgroup at smc.vnet.net
- Subject: [mg96229] Memory leak caused by JavaNew[...] (JLink package)
- From: Andrey <andrey.siver at gmail.com>
- Date: Tue, 10 Feb 2009 05:47:25 -0500 (EST)
Hello, I have a function like this: myFun[...]:=Module[{...}, ... outputDataPacketObject = JavaNew["mypackage.MyOutputClass", ...]; (* run some calculation and result result within 'outputDataPacketObject' java object *) result = MyCalcObject at runSimpleCalculation[... outputDataPacketObject ... ]; ]; The function should be called many times (>3000). It turnes out that something in the program eats the memory and after sometime the kernel says "no enough memory". So, why it might happen? What might be wrong? Is there a way to clear the memory? Regards, -Andrey