MathGroup Archive 2005

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

Search the Archive

Re: How to free memory?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59819] Re: How to free memory?
  • From: David Bailey <dave at Remove_Thisdbailey.co.uk>
  • Date: Tue, 23 Aug 2005 04:51:14 -0400 (EDT)
  • References: <de46jr$r62$1@smc.vnet.net><de6lru$cg5$1@smc.vnet.net> <de9cs2$q5l$1@smc.vnet.net> <debsf8$969$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Wonseok,

I think you will find that local variables are removed when a Module 
closes *UNLESS* the module returns an expression involving uninitialised 
  local variables, or 'exports' such an expression in some other way, 
such as assigning it to a global variable. For example:

Module[{k},
   Print[k];
   k = 99;
   ]

k$409  (*output from Print*)

k$409  (*Input to test if the local variable kept its value *)

k$409  (* No it didn't - it got re-created when the previous input was 
enetered *)


David Bailey
http://www.dbaileyconsultancy.co.uk


  • Prev by Date: Re: partial derivative of a sum
  • Next by Date: a question about intersection curve.
  • Previous by thread: Re: How to free memory?
  • Next by thread: Re: How to free memory?