- Posts: 859
- Thank you received: 170
Yes, that is exactly right - we've assigned the pointer new_descr->description to point to the same memory we were pointing to with the end pointer. We no longer need that, then.If I understand correctly, because the original *end and mallocated *end have the same address as new_descr->description, plus *end being defined within this scope, means that *end disappears without having to free and null it.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
tbaMUD © 2024