On Wednesday, 22 September 2021 at 18:38:34 UTC, Steven Schveighoffer wrote:
In terms of any kind of memory management, whether it be ARC, manual, GC, or anything else, there will always be pitfalls. It's just that you have to get used to the pitfalls and how to avoid them.

100% agree.

I could see a person used to GC complaining that C requires you to free every pointer *exactly once*.

C (at compiler level) does not require this.
You can do it free()ly. ,)
With a subsequent... yes, 'shock' after you see 'double free or corruption' message.

Tell that imaginary person this: if (p) {free(p); p = NULL}, that's all.

              • Re:... eugene via Digitalmars-d-learn
              • Re:... jfondren via Digitalmars-d-learn
              • Re:... eugene via Digitalmars-d-learn
              • Re:... Steven Schveighoffer via Digitalmars-d-learn
              • Re:... eugene via Digitalmars-d-learn
              • Re:... Steven Schveighoffer via Digitalmars-d-learn
              • Re:... eugene via Digitalmars-d-learn
              • Re:... eugene via Digitalmars-d-learn
              • Re:... eugene via Digitalmars-d-learn
              • Re:... eugene via Digitalmars-d-learn
              • Re:... eugene via Digitalmars-d-learn
              • Re:... eugene via Digitalmars-d-learn
              • Re:... eugene via Digitalmars-d-learn
              • Re:... Steven Schveighoffer via Digitalmars-d-learn
              • Re:... eugene via Digitalmars-d-learn
              • Re:... jfondren via Digitalmars-d-learn
    • Re: Program crash: GC de... H. S. Teoh via Digitalmars-d-learn
  • Re: Program crash: GC destroy... eugene via Digitalmars-d-learn

Reply via email to