Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

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


  • Prev by Date: Re: testing if a point is inside a polygon
  • Next by Date: Usage of #1
  • Previous by thread: Consultant Needed
  • Next by thread: Re: Memory leak caused by JavaNew[...] (JLink package)