What is the standard practice for detecting memory leaks using the Google Test platform (not windows)

I have a metric ton of Unit Tests using Google Test.

Currently, using Xcode, I have noticed some other testing structures that detect memory leaks at the end of each unit test, and I assume that there is a certain way to do the same with Google Test. I hope this is not a feature of the Boost test and just a few others.

If anyone could point me in the right direction, I would appreciate it. Rather, avoid switching test frames.

Right now, I think valgrind might be worth a look, I just don't know how I will connect to each test. I assume that I will not be able to do this directly from xcode.

+6
source share
1 answer

To my knowledge, unit tests for memory leaks are clearly not supported in Google Test. However, you have an extension that fills this part for you

+5
source

Source: https://habr.com/ru/post/953284/


All Articles