Re: GC being too eager?

2014-04-11 Thread Paulo Pinto
On Friday, 11 April 2014 at 13:02:01 UTC, monarch_dodra wrote: On Friday, 11 April 2014 at 12:52:52 UTC, Nils Boßung wrote: On Freitag, 11. April 2014 13:44, monarch_dodra wrote: Yes, it's bug. Trivial to fix too. Please file it. I think I already filed it quite some time ago: https://issues

Re: GC being too eager?

2014-04-11 Thread monarch_dodra
On Friday, 11 April 2014 at 12:52:52 UTC, Nils Boßung wrote: On Freitag, 11. April 2014 13:44, monarch_dodra wrote: Yes, it's bug. Trivial to fix too. Please file it. I think I already filed it quite some time ago: https://issues.dlang.org/show_bug.cgi?id=6998 I am appalled that such a triv

Re: GC being too eager?

2014-04-11 Thread Nils Boßung
On Freitag, 11. April 2014 13:44, monarch_dodra wrote: > Yes, it's bug. Trivial to fix too. Please file it. I think I already filed it quite some time ago: https://issues.dlang.org/show_bug.cgi?id=6998 See also: http://stackoverflow.com/questions/22624021

Re: GC being too eager?

2014-04-11 Thread Steven Schveighoffer
On Fri, 11 Apr 2014 07:25:15 -0400, Paulo Pinto wrote: On Friday, 11 April 2014 at 09:32:29 UTC, Chris wrote: On Friday, 11 April 2014 at 06:51:01 UTC, Paulo Pinto wrote: On Thursday, 10 April 2014 at 09:31:30 UTC, John Colvin wrote: On Thursday, 10 April 2014 at 09:24:51 UTC, Paulo Pinto

Re: GC being too eager?

2014-04-11 Thread monarch_dodra
On Friday, 11 April 2014 at 12:26:14 UTC, Steven Schveighoffer wrote: This is a side effect of classes being first-class reference types. Array needs to call destroy on structs, but not on classes. Sort of a "shallow destroy." It's an interesting bug. -Steve Yeah, the issue "transcends" the

Re: GC being too eager?

2014-04-11 Thread monarch_dodra
On Friday, 11 April 2014 at 11:25:16 UTC, Paulo Pinto wrote: This was only to show you how to reproduce the error. On my application I use Array as a backing store for a BinaryHeap used to store the nodes that are available on the A* open list. If this usage of Array is correct and the destr

Re: GC being too eager?

2014-04-11 Thread Paulo Pinto
On Friday, 11 April 2014 at 09:32:29 UTC, Chris wrote: On Friday, 11 April 2014 at 06:51:01 UTC, Paulo Pinto wrote: On Thursday, 10 April 2014 at 09:31:30 UTC, John Colvin wrote: On Thursday, 10 April 2014 at 09:24:51 UTC, Paulo Pinto wrote: In a toy project I am working on with D v2.065, I cam

Re: GC being too eager?

2014-04-11 Thread Chris
On Friday, 11 April 2014 at 06:51:01 UTC, Paulo Pinto wrote: On Thursday, 10 April 2014 at 09:31:30 UTC, John Colvin wrote: On Thursday, 10 April 2014 at 09:24:51 UTC, Paulo Pinto wrote: In a toy project I am working on with D v2.065, I came to the following situation: Node path = solver.find

Re: GC being too eager?

2014-04-11 Thread Paulo Pinto
On Thursday, 10 April 2014 at 09:31:30 UTC, John Colvin wrote: On Thursday, 10 April 2014 at 09:24:51 UTC, Paulo Pinto wrote: In a toy project I am working on with D v2.065, I came to the following situation: Node path = solver.find (map, start, end); if (path !is null) { path.writeContents

Re: GC being too eager?

2014-04-10 Thread Paulo Pinto
On Thursday, 10 April 2014 at 09:31:30 UTC, John Colvin wrote: On Thursday, 10 April 2014 at 09:24:51 UTC, Paulo Pinto wrote: In a toy project I am working on with D v2.065, I came to the following situation: Node path = solver.find (map, start, end); if (path !is null) { path.writeContents

Re: GC being too eager?

2014-04-10 Thread Paulo Pinto
On Thursday, 10 April 2014 at 09:31:30 UTC, John Colvin wrote: On Thursday, 10 April 2014 at 09:24:51 UTC, Paulo Pinto wrote: In a toy project I am working on with D v2.065, I came to the following situation: Node path = solver.find (map, start, end); if (path !is null) { path.writeContents

Re: GC being too eager?

2014-04-10 Thread Paulo Pinto
On Thursday, 10 April 2014 at 10:37:58 UTC, Rene Zwanenburg wrote: On Thursday, 10 April 2014 at 09:24:51 UTC, Paulo Pinto wrote: In a toy project I am working on with D v2.065, I came to the following situation: Node path = solver.find (map, start, end); if (path !is null) { path.writeCont

Re: GC being too eager?

2014-04-10 Thread Rene Zwanenburg
On Thursday, 10 April 2014 at 09:24:51 UTC, Paulo Pinto wrote: In a toy project I am working on with D v2.065, I came to the following situation: Node path = solver.find (map, start, end); if (path !is null) { path.writeContents(); <-- Access Violation } Apparently between the test and tr

Re: GC being too eager?

2014-04-10 Thread John Colvin
On Thursday, 10 April 2014 at 09:24:51 UTC, Paulo Pinto wrote: In a toy project I am working on with D v2.065, I came to the following situation: Node path = solver.find (map, start, end); if (path !is null) { path.writeContents(); <-- Access Violation } Apparently between the test and tr

GC being too eager?

2014-04-10 Thread Paulo Pinto
In a toy project I am working on with D v2.065, I came to the following situation: Node path = solver.find (map, start, end); if (path !is null) { path.writeContents(); <-- Access Violation } Apparently between the test and trying to use the class, the reference becomes null. Quite stra