January 15, 2020 Re: Invalid memory operation during allocation with `new` | ||||
---|---|---|---|---|
| ||||
Posted in reply to Per Nordlöw | On Monday, 13 January 2020 at 23:06:01 UTC, Per Nordlöw wrote:
> Unfortunately that didn't tell me the cause of the problem but only the stack trace of the failing call to `new` which is not called inside a destructor.
I found the problem. I was greedly using the `__monitor__` slot of some classes in order to get one extra word of class storage. Setting it to `null` in those classes' destructors made the memory error go away. Thanks anyway for valuable input.
|
Copyright © 1999-2021 by the D Language Foundation