Heob으로 메모리 누수 감지

Windows에서는 Heob 힙 옵저버를 사용해 버퍼 오버런과 메모리 누수를 감지할 수 있습니다.

현재 열려 있는 프로젝트에서 Heob을 실행하려면 다음과 같이 하세요:

  1. Analyze > Heob 을 선택합니다.

    홉 설정

  2. 사용할 Heob 설정 프로필을 선택하거나 New 을 선택하여 새 프로필을 만듭니다.
  3. Heob path 에 Heob 실행 파일의 경로를 입력합니다.
  4. 검사 실행을 위한 설정을 지정합니다.
  5. OK 을 선택하여 Heob을 실행합니다.

Qt Creator 애플리케이션을 실행한 다음 터미널에서 Heob을 실행합니다.

터미널에서 실행 중인 홉

Heob은 버퍼 오버런에 대한 액세스 위반을 발생시키고 문제가 되는 명령어 및 버퍼 할당의 스택 추적을 기록합니다. Heob이 정상적으로 종료된 후 Memcheck 보기에서 결과를 확인할 수 있습니다.

멤체크 보기의 Heob 결과

방법: 분석, 분석기, Heob코드 분석도참조하세요 .

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.