Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why do does the memory view often show leaked memory which never gets collected by the garbage collector?

0
Posted

Why do does the memory view often show leaked memory which never gets collected by the garbage collector?

0

The garbage collector never collects internal MFC objects, which are temporary and are managed by MFC. These do not normally show up as leaks. The Microsoft® C runtime has various leaks in it, or apparent leaks in it. Some of this memory is referenced by thread local storage slots and will be cleaned up when the particular thread is destroyed. Any memory which is not marked as _IGNORE_BLOCK by MFC or _CRT_BLOCK by the C runtime can and will be garbage collected. Memory on Win32 heaps will not be garbage collected.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123