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 item To 
 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",可以直接進入源文件,定位到所在行,方便修改。

 

 

下載地址:
1.DevPartner Studio Professional Edition 11.0.114.0 http://download.csdn.net/detail/akof1314/4925467http://download.csdn.net/detail/akof1314/4925600
2.DevPartner for Visual C++ BoundsChecker Suite 11.0.114.0 http://download.csdn.net/detail/akof1314/4925726http://download.csdn.net/detail/akof1314/4925780

3.DevPartner License Manager 10 http://download.csdn.net/detail/akof1314/4927248

 

轉自: http://blog.csdn.net/akof1314/article/details/8434499

--------------------- 本文來自 duanbeibei 的CSDN 博客 ,全文地址請點擊:https://blog.csdn.net/duanbeibei/article/details/37757461?utm_source=copy


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM