博客
关于我
悬垂指针和野指针的区别
阅读量:400 次
发布时间:2019-03-06

本文共 661 字,大约阅读时间需要 2 分钟。

Difference between Dangling Pointer and Wild Pointer?

A dangling pointer is a pointer that used to point to a valid address but now no longer does. This is usually due to that memory location being freed up and no longer available. There is nothing wrong with having a dangling pointer unless you try to access the memory location pointed at by that pointer. It is always best practise not to have or leave dangling pointers.

A wild pointer is a pointer that has not been correctly initialised and therefore points to some random piece of memory. It is a serious error to have wild pointers.

悬垂指针之前指向的是有效的地址,但是现在不是这样了,通常是那个内存地址被释放掉了.

而野指针是没有被正确初始化,它指向了内存中随机的位置.

转载地址:http://hvbkz.baihongyu.com/

你可能感兴趣的文章
云计算之路-阿里云上:奇怪的CPU 100%问题
查看>>
云计算之路-阿里云上:2014年6月12日12点IIS请求到达量突降
查看>>
上周热点回顾(6.9-6.15)
查看>>
上周热点回顾(6.16-6.22)
查看>>
上周热点回顾(6.23-6.29)
查看>>
上周热点回顾(10.20-10.26)
查看>>
上周热点回顾(2.16-2.22)
查看>>
上周热点回顾(3.2-3.8)
查看>>
.NET跨平台之旅:借助ASP.NET 5 Beta5的新特性显示CLR与操作系统信息
查看>>
上周热点回顾(7.27-8.2)
查看>>
上周热点回顾(9.28-10.4)
查看>>
上周热点回顾(3.28-4.3)
查看>>
上周热点回顾(5.2-5.8)
查看>>
上周热点回顾(5.9-5.15)
查看>>
上周热点回顾(8.8-8.14)
查看>>
.NET跨平台之旅:将示例站点升级至 .NET Core 1.1 Preview 1
查看>>
上周热点回顾(1.16-1.22)
查看>>
上周热点回顾(1.23-1.29)
查看>>
上周热点回顾(3.20-3.26)
查看>>
上周热点回顾(4.24-4.30)
查看>>