头指针
pHead如果只是賦予地址,沒有申請空間,不能用free釋放
PathList pList = (PathList)malloc(sizeof(Path));
PathList pHead = pList;
pList = pHead;
free(pList);
//free(pHead);
總結
- 上一篇: #pragma once与#ifndef
- 下一篇: C#知识点
pHead如果只是賦予地址,沒有申請空間,不能用free釋放
PathList pList = (PathList)malloc(sizeof(Path));
PathList pHead = pList;
pList = pHead;
free(pList);
//free(pHead);