C++ 代码分析:内存泄漏问题
下面的代码的问题是:\n\nvoid f(int a) {\n auto* const i = new int;\nif(a == 0) throw std::exception("error");\ndelete i; \n}\n\na 编译期不通过\nb 悬垂指针\nc 内存泄漏\nd 以上都不对\n\n内容:c 内存泄漏
原文地址: https://www.cveoy.top/t/topic/pArD 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
下面的代码的问题是:\n\nvoid f(int a) {\n auto* const i = new int;\nif(a == 0) throw std::exception("error");\ndelete i; \n}\n\na 编译期不通过\nb 悬垂指针\nc 内存泄漏\nd 以上都不对\n\n内容:c 内存泄漏
原文地址: https://www.cveoy.top/t/topic/pArD 著作权归作者所有。请勿转载和采集!