Whenever freeing the structured element (which in turn contains the pointer to dynamically allocated memory location), first traverse to the child memory location and start freeing from there, traversing back to the parent node.
英
美
释义
当释放结构体成员的内存时(这个结构体有成员指针指向动态分配的内存),要先把子内存区域释放掉,再释放父内存区域。
把海词放在桌面上,查词最方便
触屏版
|
电脑版
©2003 - 2025 海词词典(Dict.cn)
立即下载