内存泄漏1——DevPartner Studio Professional Edition 11 内存泄露检测使用

 DevPartner Studio Professional Edition含有静态代码分析、错误检测、性能、覆盖率和内存分析以及性能专家功能,用于 Visual Studio 2012、Visual Studio 2010、Visual Studio 2008 和 Visual Studio 2005。
主页:http://www.borland.com/products/devpartner/read/

     下载安装DevPartner Studio Professional Edition 11试用版,记得需要安装Micro Focus License Manager。
在Visual Studio 2008菜单栏上多出了一个"DevPartner"选项,如下图所示:

菜单项功能,简述如下:

 Choose this menu or toolbar itemTo 
 Error detection
 错误检测
 Perform run-time error detection using BoundsChecker technology
 执行运行时错误检测使用BoundsChecker技术
 Coverage Analysis
 覆盖分析
 Perform run-time code coverage analysis
 执行运行时代码覆盖率分析
 Error detection and Coverage Analysis
 错误检测和覆盖分析
 Perform run-time error detection with code coverage analysis
 执行运行时错误检测与代码覆盖分析
 Performance Analysis
 性能分析
 Execute run-time performance analysis
 执行运行时的性能分析
 Memory Analysis
 内存分析
 Execute run-time memory analysis
 执行运行时的内存分析
 Performance Expert
 性能专家
 Execute run-time analysis with Performance Expert
 使用性能专家执行运行时分析
 Perform Code Review
 执行代码审查
 Perform static code analysis
 执行静态代码分析
 Manage Code Review Rules
 管理代码审查规则
 Access code review rules management
 访问代码审查规则管理
 Error Detection Rules
 错误检测规则
 Access error detection rules management, used to filter or suppress detected errors
 访问错误检测规则管理,用于滤除或抑制检测到的错误
 Native C/C++ Instrumentation
 本机C/C++规范
 Perform compile-time instrumentation for: 
 Error detection, Error detection with coverage, Performance or coverage analysis
 执行编译时规范:
 错误检测,错误覆盖检测,性能或覆盖分析
 Native C/C++ Instrumentation Manager
 本机C/C++规范管理
 Access the Instrumentation Manager
 访问规范管理
 Correlate
 关联
 Correlate performance or coverage files
 关联性能或覆盖文件
 Merge Coverage Files
 合并覆盖文件
 Merge coverage analysis sessions
 将覆盖分析会话合并
 Options
 选项
 Access DevPartner options
 Choices include: Analysis, Code review, Error Detection
 访问DevPartner的选项
 选项包括:分析,代码审查,错误检测

现在,测试内存泄露检测:

1.准备一个测试工程,这里为Win32控制台程序;
2.菜单"DevPartner"→"Start with Error Detection",可以看到解决方案下,自动添加了一个"DevPartner Studio"项,右侧包含内存泄露、检测到的错误数等等,如下图:

3.现在在测试代码中,加入测试语句:

1
2
3
4
5
int _tmain( int argc, _TCHAR* argv[])
{
     char *p =  new  char[ 100];
     return  0;
}
4.再次" Start with Error Detection ",程序结束后,可以看到报告了内存泄露,如下图:

在" 内存泄露 "面板,展开详细,可以看到如下内容:

指示了内存泄露的分配位置,选中这一行,可以看到详细的调用堆栈和源代码,如下图所示:

5.右键此行,选择" Edit Source ",可以直接进入源文件,定位到所在行,方便修改。
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
DevPartner Studio Professional Edition Release 11.4.0 , 含有静态代码分析、错误检测、性能、覆盖率和内存分析以及性能专家功能。 Visual Studio支持范围: Visual Studio 2005 SP1 ---- Visual Studio 2017 update 15.4。 windows支持范围: Server 2012 R2,基礎版; Windows 8.0,8.1; Server 2003 R2 SP2; Windows XP 專業版 SP3; Server 2008 SP2; Windows Vista SP2; Server 2008 R2,基礎版,SP1; Windows 7,基礎版,SP1; Windows 10(2017 年秋季)創作者更新。 DevPartner Studio Professional Edition is a suite of tightly integrated development features. DevPartner Studio incorporates code reviewing, error detection, two kinds of performance analysis, coverage analysis, and a memory analysis feature all integrated into Visual Studio. DevPartner Studio helps developers detect, diagnose, and resolve software bugs, maximize code performance, and ensure optimal code coverage and testing. 功能关键词:CodeReview;BoundsChecker;TrueCoverage;TrueTime; 新特性: 【New in Release 11.4】 Full Support for Windows 10.0 Fall Creators Update The product suite fully supports Windows 10.0 Fall Creators Update Full Support for Visual Studio 2017 update 15.4 DevPartner Studio 11.4 provides full Microsoft Visual Studio 2017 support. This includes full support the analysis of applications developed using Microsoft Visual Studio, and full integration into the Visual Studio 2017 IDE. Analyze, detect errors and perform static code reviews in existing supported project types and new Visual Studio 2017 project types. ================================== 用WinRAR 5.70 压缩的exe安装程序,建议用WinRAR 5.70及以上版本解压。 亲测在win7 x64 + vs2008sp1, win7 x64 + vs2015的环境下都可用。 此压缩包中只有安装本体程序 dpspe110400.exe。 ======= DevPartner License Manager 11.4.0 (x86 + x64): https://download.csdn.net/download/xiquanxyz/11104243 DevPartner Studio Professional Edition 11.4.0_官方文档: https://download.csdn.net/download/xiquanxyz/11104275

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值