InvalidMemoryOperationError@(0)

Vladimir Panteleev via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Nov 17 14:19:03 PST 2014


On Monday, 17 November 2014 at 16:40:18 UTC, ketmar via 
Digitalmars-d-learn wrote:
> On Mon, 17 Nov 2014 15:41:25 +0000
> Andre via Digitalmars-d-learn 
> <digitalmars-d-learn at puremagic.com> wrote:
>
>> 	~this()
>> 	{
>> 		foreach(cp; this._columns)
>> 		{	
>> 		}
>> 	}
> don't do that in destructors. `_columns` field can be already 
> collected
> by GC.

Last I checked, the GC finalizes all dead objects before freeing 
them. InvalidMemoryOperation indicates that an allocation 
occurred, where is it?

I can't reproduce the problem with D from git HEAD.


More information about the Digitalmars-d-learn mailing list