current GC behavior

2012-11-06 Thread luka8088
Hello everyone, I was writing some unit tests and I also wanted to test that in certain cases object references are properly removed everywhere so that GC can collect them in order to make sure there is no memory leak. While trying to achieve this I learned that objects are not always

Re: current GC behavior

2012-11-06 Thread Ali Çehreli
On 11/06/2012 03:27 AM, luka8088 wrote: I was writing some unit tests and I also wanted to test that in certain cases object references are properly removed everywhere so that GC can collect them in order to make sure there is no memory leak. While trying to achieve this I learned that

Re: current GC behavior

2012-11-06 Thread thedeemon
On Tuesday, 6 November 2012 at 11:27:25 UTC, luka8088 wrote: Hello everyone, I was writing some unit tests and I also wanted to test that in certain cases object references are properly removed everywhere so that GC can collect them in order to make sure there is no memory leak. While trying

Re: current GC behavior

2012-11-06 Thread luka8088
On 6.11.2012 18:00, Ali Çehreli wrote: On 11/06/2012 03:27 AM, luka8088 wrote: I was writing some unit tests and I also wanted to test that in certain cases object references are properly removed everywhere so that GC can collect them in order to make sure there is no memory leak. While

Re: current GC behavior

2012-11-06 Thread luka8088
On 6.11.2012 18:02, thedeemon wrote: On Tuesday, 6 November 2012 at 11:27:25 UTC, luka8088 wrote: Hello everyone, I was writing some unit tests and I also wanted to test that in certain cases object references are properly removed everywhere so that GC can collect them in order to make sure

Re: current GC behavior

2012-11-06 Thread luka8088
On 6.11.2012 21:59, Ali Çehreli wrote: On 11/06/2012 12:00 PM, luka8088 wrote: Yes, but it seems that we can in general say that the following code will never fail... or am I wrong ? import core.memory; class a { static int totalRefCount = 0; this () { totalRefCount++; } ~this