Memory allocation failed. Why?
Nicholas Wilson via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Nov 20 16:16:41 PST 2016
On Sunday, 20 November 2016 at 18:58:04 UTC, Basile B. wrote:
> On Sunday, 20 November 2016 at 17:47:50 UTC, MGW wrote:
>> [...]
>
> For me there's no exception. Maybe the GC is poluted. Try to
> add this after each iteration in the first test loop:
>
> import core.memory: GC;
> GC.collect();
>
> Also note that the text you pas in the message box should be
> null terminated, eg:
>
> MessageBoxA(null, "--The end--\0".ptr, "".ptr, 0);
string literals are implicitly null terminated explicitly for the
interoperation with C.
there is no need.
More information about the Digitalmars-d-learn
mailing list