How to Test for Memory Leaks?

后端 未结 5 821
情话喂你
情话喂你 2020-12-17 03:15

We have an application with hundreds of possible user actions, and think about how enhancing memory leak testing.

Currently, here\'s the way it happens: When manuall

5条回答
  •  我在风中等你
    2020-12-17 03:53

    first line of defense:

    • check list with common memory allocation related errors for developers
    • coding guidelines

    second line of defense:

    • code reviews
    • static code analyis (as a part of build process)
    • memory profiling tools

    If you work with unmanaged language (like C/C++) you can efficiently discover most of the memory leaks by hijacking memory management functions. For example you can track all memory allocations/deallocations.

提交回复
热议问题