In what situation can new Struct() return null?

faissaloo faissaloo at gmail.com
Fri May 10 17:32:25 UTC 2019


On Friday, 10 May 2019 at 12:19:29 UTC, Cym13 wrote:
> On Friday, 10 May 2019 at 10:11:51 UTC, faissaloo wrote:
>> My program contains the following statement:
>>     auto newChildNode = new Node();
>>
>> In debugging I have found that this pointer evaluates to null, 
>> what could cause this? I should have plenty of memory, my only 
>> other idea is some sort of heap corruption.
>
> Could you share a complete, concise, compilable example 
> demonstrating that bug? One line is rather short to understand 
> what's happening.

Unfortunately not, I can't seem to reproduce it outside my 
codebase.


More information about the Digitalmars-d-learn mailing list