
悬垂指针和野指针的区别
发布日期:2021-05-09 00:21:11
浏览次数:13
分类:博客文章
本文共 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.
悬垂指针之前指向的是有效的地址,但是现在不是这样了,通常是那个内存地址被释放掉了.
而野指针是没有被正确初始化,它指向了内存中随机的位置.
发表评论
最新留言
不错!
[***.144.177.141]2025年04月17日 20时27分58秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
2.1.4奇偶校验码
2021-05-09
2.2.2原码补码移码的作用
2021-05-09
Java面试题:Servlet是线程安全的吗?
2021-05-09
Java集合总结系列2:Collection接口
2021-05-09
Linux学习总结(九)—— CentOS常用软件安装:中文输入法、Chrome
2021-05-09
大白话说Java反射:入门、使用、原理
2021-05-09
MySQL用户管理:添加用户、授权、删除用户
2021-05-09
比技术还重要的事
2021-05-09
linux线程调度策略
2021-05-09
软中断和实时性
2021-05-09
Linux探测工具BCC(可观测性)
2021-05-09
流量控制--2.传统的流量控制元素
2021-05-09
SNMP介绍及使用,超有用,建议收藏!
2021-05-09
51nod 1596 搬货物(二进制处理)
2021-05-09
来自星星的祝福(容斥+排列组合)
2021-05-09
Hmz 的女装(递推)
2021-05-09
HDU5589:Tree(莫队+01字典树)
2021-05-09
不停机替换线上代码? 你没听错,Arthas它能做到
2021-05-09
sharding-jdbc 分库分表的 4种分片策略,还蛮简单的
2021-05-09