野指针与悬空指针

1. 什么是野指针(wild pointer)?

A pointer in c which has not been initialized is known as wild pointer.

野指针(wild pointer)就是没有被初始化过的指针。

2. 什么是悬空指针(dangling pointer)?

If a pointer still references the original memory after it has been freed, it is called a dangling pointer.

悬空指针是指针最初指向的内存已经被释放了的一种指针。

参考:野(wild)指针与悬空(dangling)指针 - veli - 博客园 (cnblogs.com)

posted @ 2023-04-11 18:13  小头痛  阅读(22)  评论(0编辑  收藏  举报