Re: [julia-users] Garbage collection outside the global scope

2015-08-07 Thread Andrew B. Martin
Thanks!

Re: [julia-users] Garbage collection outside the global scope

2015-08-06 Thread colintbowers
On Thursday, 6 August 2015 22:34:26 UTC+10, Andrew B. Martin wrote: > > Thanks for the comment, Colin. > > Instead, the RAM usage counter ramped up to the upper limit I had set >> using a conditional if statement, and then when it hit that ... > > > I'm curious; can you give a code sample of the

Re: [julia-users] Garbage collection outside the global scope

2015-08-06 Thread Andrew B. Martin
Thanks for the comment, Colin. Instead, the RAM usage counter ramped up to the upper limit I had set using > a conditional if statement, and then when it hit that ... I'm curious; can you give a code sample of the conditional if statement?

Re: [julia-users] Garbage collection outside the global scope

2015-08-05 Thread colintbowers
Hi Andrew, No answer here, just some behaviour that might be of interest to you (everything I write pertains to v0.3. I've no experience with v0.4 and I understand some fairly large changes have occurred in garbage collection). I faced the problem in my work of reading in lots of data from the

Re: [julia-users] Garbage collection outside the global scope

2015-08-04 Thread Sisyphuss
I claim no expertise in this domain. I have just some related question about the gc: In static language, we do RAII. In dynamic language, we use gc to free us from worrying about the memory. It releases resource automatically when we need more memory for new objects. So why bother to call gc()

Re: [julia-users] Garbage collection outside the global scope

2015-08-04 Thread Andrew B. Martin
Thanks for the explanation, Yichao. If I want to delete the object and free up the memory, what should I do?

Re: [julia-users] Garbage collection outside the global scope

2015-08-04 Thread Yichao Yu
On Tue, Aug 4, 2015 at 1:57 PM, Andrew B. Martin wrote: > I'm having a hard time figuring out how to free up memory by zeroing and > garbage collecting objects in a function. > > function runModel() > d = generateData() > d = 0 > gc() > end > > > When I run runModel() in the REPL memor

[julia-users] Garbage collection outside the global scope

2015-08-04 Thread Andrew B. Martin
I'm having a hard time figuring out how to free up memory by zeroing and garbage collecting objects in a function. function runModel() d = generateData() d = 0 gc() end When I run runModel() in the REPL memory usage remains as if d is still stored in memory. Even if I do: for i i