---
title: "Comment by Afam Ugwuanyi on \"Implementing Garbage Collection In C\" | Hashnode"
description: "That&#39;s a very nice implementation. It takes care of malloc and free all at once so that you don&#39;t have to keep track of the malloced memory but what hap"
url: "https://hashnode.com/posts/implementing-garbage-collection-in-c/637ea89825817f76a27be716/comment/637f6d7ae391b6dfe6538892"
---

[Discussion](https://hashnode.com/posts/implementing-garbage-collection-in-c/637ea89825817f76a27be716)

Comment [Implementing Garbage Collection In C](https://hashnode.com/posts/implementing-garbage-collection-in-c/637ea89825817f76a27be716)

[Afam Ugwuanyi](https://hashnode.com/@Phyro)

[Nov 24, 2022](https://hashnode.com/posts/implementing-garbage-collection-in-c/637ea89825817f76a27be716/comment/637f6d7ae391b6dfe6538892)

That's a very nice implementation. It takes care of malloc and free all at once so that you don't have to keep track of the malloced memory but what happens when someone deletes a memory in the list and that memory is no more accessible. Then won't the whole structure come apart and create even bigger leaks?

[David John](https://hashnode.com/@mcsavvy)

[Nov 24, 2022](https://hashnode.com/posts/implementing-garbage-collection-in-c/637ea89825817f76a27be716/comment/637f6d7ae391b6dfe6538892#reply-637f81aad25c5ee451788bae)

Bro, in C, there are so many ways to break a program if you're a little intention about doing it. That person better be careful.
