AlkaliMarxist [he/him]

  • 0 Posts
  • 5 Comments
Joined 2 years ago
cake
Cake day: December 17th, 2022

help-circle
  • Yeah, unless I’m missing something the author would have the same outcome with regular pointers if he’d freed them at the same time (one at the end of the anon scope and one at the end of fun1). This is nothing to do with garbage collection and is simply a result of, as you mention, pointing to the same memory with two pointers and freeing both.

    His issue seems to be with the implementation of malloc, which is pretty funny because he’s basically claiming C itself has unpredictable garbage collection. I almost can’t believe it’s legit, it seems like such a basic, fundamental misunderstanding of concepts it’s like chatGPT output.