On Saturday, 9 March 2024 at 07:49:52 UTC, Liam McGillivray wrote:
But that begs the question; why? Don't dynamic arrays always start with a length of 0? If the array was only extended when valid objects were appended using the append operator `~=`, and none of those objects were deleted (as I the destructor was never called), why would some of the array elements be null?

I'll answer my own question; because the thing assigned to the array was already null.

Anyway, I managed to fix the segfaults. In the latest two commits, I have turned some pointers into references. Now that I understand this, I should have fewer segmentation faults.
  • Why am I getting... Liam McGillivray via Digitalmars-d-learn
    • Re: Why am ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
      • Re: Why... Liam McGillivray via Digitalmars-d-learn
        • Re:... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
        • Re:... Liam McGillivray via Digitalmars-d-learn

Reply via email to