c primer plus这本书中,
linked list这部分free list memory有这样的代码:
current = head;
while (current != NULL)
{
free(current);
current = current->next;
}
我的不解是
current 既然已经free了,current->next为什么还能知道值?
谢谢!
c primer plus这本书中,
linked list这部分free list memory有这样的代码:
current = head;
while (current != NULL)
{
free(current);
current = current->next;
}
我的不解是
current 既然已经free了,current->next为什么还能知道值?
谢谢!
free 函数执行后:
malloc
分配。