Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用一个由外包商开发的库。它有内存泄漏。为了调试我的应用程序,我总是必须知道新的更改不会导致新的内存泄漏。
我所做的是在他们的库中选择的所有块都具有 IGNORED_BLOCK 状态。
但是当我尝试这个时,Visual Studio 失败并出现 AssertFault:
#include <crtdbg.h> #include <assert.h> void main( ) { delete new(_IGNORE_BLOCK, __FILE__, __LINE__) int; }