On 1/22/15 10:59 AM, "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= <ola.fosheim.grostad+dl...@gmail.com>" wrote:
On Thursday, 22 January 2015 at 11:58:13 UTC, Steven Schveighoffer wrote:
A race condition can LEAD to this being triggered, but the abort
itself is not a race condition. And forcing a default of @nogc will
not fix this.

Why not? If you have a race condition that leads a memory leak when
using explicit deallocation, then that leak will lead to destructor
being run by the collector. Which will fail if the destructor
gc-allocates. GC is meant to make allocation safer, not less safe.

Disallowing compilation of the dtor does not fix the race condition. We are no closer to race-free code here.

What you are basically saying is, race conditions are OK, as long as they don't allocate memory in dtors.

-Steve

Reply via email to