Open olwethumlimi opened 1 year ago
In your example at line 4, the pointer from line 2 became unreachable., since message
is now pointing at the string literal "update". The memory allocated at line 2 will be freed automatically.
If you're really concerned about memory leaks, you can run tgc_free()
on the original pointer.
e.g