Memory Leak in Microsoft Foundation Class

Asked By 10 points N/A Posted on -
qa-featured

I have received a Microsoft Foundation Class (MFC) dialogue application. It is determine as a title called CMyDialog from CAxDialogImpl. I make some object and called DoModal CMyDialog, and install the application. However, I believed that the memory was leaking and I notice that the memory allocated by HeapAlloc was not released. Where is the freedom? Please help me.

SHARE
Answered By 10 points N/A #91737

Memory Leak in Microsoft Foundation Class

qa-featured

The possible cause of the memory is as a result of you having allocated the memory on the heap and thereafter you never deallocated that memory so as it can reused later on, or you end up using a memory that has already been allocated. The problem occurs for programs that have been set to run a certain period of time only. When the program has been to run for a long period of time, then a very small leak will automatically compound itself, and then all the memory resources will be exhausted leading to the program to crash. The memory leaks can be very hard to detect sometimes. With MFC, you can detect the leaks during the development stage.

Regards
Thompson Locker

 

Related Questions