What to do with InvalidMemoryOperationError

anonymous via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jan 23 13:38:22 PST 2015


On Friday, 23 January 2015 at 21:25:01 UTC, Nordlöw wrote:
> On Friday, 23 January 2015 at 10:13:43 UTC, Joakim wrote:
>> InvalidMemoryOperationError generally means that you are 
>> performing certain disallowed memory operations during a full 
>> garbage collection, such as allocating while the gc is running.
>
> If my app is single-threaded this cannot happen then.

Single-/multi-threaded doesn't make a difference. This happens 
with a single thread, too. The GC calls destructors. When a 
destructor allocates then, it allocates during a GC run.


More information about the Digitalmars-d-learn mailing list