Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

garbage collection and netlink

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56693] garbage collection and netlink
  • From: Andreas Tanner <tanner at ivs.tu-berlin.de>
  • Date: Wed, 4 May 2005 00:32:59 -0400 (EDT)
  • Organization: Technische Universitaet Berlin, Deutschland
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

in this example:

----------------
IKernelLink ml = MathLinkFactory.CreateKernelLink("-linkmode launch 
-linkname 'c:\\program files\\wolfram 
research\\mathematica\\4.2\\mathkernel'");
StringBuilder s = new StringBuilder();
s.Append("<<Statistics`NormalDistribution`;");
			
			s.Append("<<Statistics`DiscreteDistributions`;");
			
			s.Append("dpoisson=PoissonDistribution["+NumberOfClients*BirthRate+"];");
		 
s.Append("dnormal=NormalDistribution["+MeanBidAmount+","+BidAmountSigma+"];");
			Console.WriteLine(s);
ml.Evaluate(s.ToString());
ml.WaitAndDiscardAnswer();
			

ml.Evaluate("Table[Random[dnormal],{i,1,Random[dpoisson]}]");
ml.WaitForAnswer();
float[] x= ml.GetSingleArray();

...

-------------------


what is left in the kernel's memory?
Clearly, dpoisson and dnormal are, but what about the tables of the 
generated randoms? They are not stored in any variable, so they should 
be garbage-collected?

Thanks for your help
--Andreas.


  • Prev by Date: Re: GUIkit problem
  • Next by Date: Re: debugging
  • Previous by thread: Re: Variant of inner Product ...
  • Next by thread: changing algorithm, finding residuals w/FindFit