Samaursa
Samaursa

Reputation: 17271

Output _CrtDumpMemoryLeaks() to a String

Is it possible to output the contents of the memory leak dump to a String (not a console)? Hopefully yes :)

_CrtDumpMemoryLeaks(); // to-string?

Upvotes: 2

Views: 761

Answers (1)

Terry Mahaffey
Terry Mahaffey

Reputation: 11991

No. But you can have _CrtDumpMemoryLeaks output to a file (using _CrtSetReportMode and _CrtSetReportFile) and then read that file into a string.

Upvotes: 5

Related Questions