You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CDocument d;
d.parse(html);
CSelection c = d.find("#something");
}
}
valgrind --tool=memcheck ./example
==6641== Memcheck, a memory error detector
==6641== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==6641== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==6641== Command: ./example
==6641==
==6641==
==6641== HEAP SUMMARY:
==6641== in use at exit: 0 bytes in 0 blocks
==6641== total heap usage: 285,001 allocs, 285,001 frees, 10,925,066 bytes allocated
==6641==
==6641== All heap blocks were freed -- no leaks are possible
==6641==
==6641== For counts of detected and suppressed errors, rerun with: -v
==6641== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 6 from 6)
If I have the following code in a managed C++/CLI project:
for (int i = 0; i < 5000; i++)
{
std::string html = HttpRequest(......);
CDocument d;
d.parse(html);
CSelection c = d.find("#something");
if (c.nodeNum() != 0)
{ ,,,, }
}
Will this cause a memory leak, as variables d and c are not being destructed? What can I do to remedy this if that's the case?
The text was updated successfully, but these errors were encountered: