大家好,又见面了,我是全栈君,祝每个程序员都可以多学几门语言。
A memory leak is a particular type of unintentional memory consumption by a computer program where the program fails to release memory when no longer needed. This condition is normally the result of a bug in a program that prevents it from freeing up memory that it no longer needs.This term has the potential to be confusing, since memory is not physically lost from the computer. Rather, memory is allocated to a program, and that program subsequently loses the ability to access it due to program logic flaws.
堆内存泄漏(Heap leak)。对内存指的是程序执行中依据须要分配通过malloc,realloc new等从堆中分配的一块内存,再是完毕后必须通过调用相应的 free或者delete 删掉。假设程序的设计的错误导致这部分内存没有被释放,那么此后这块内存将不会被使用,就会产生Heap Leak.
DrawText(hdc, TEXT(“Drawing Text with Impact”), -1,&rect, DT_NOCLIP);
}
Char szbuff[256];
IDNS_AddQuestions(M_pDns,AEEDNSTYPE_A,ADDDNSCLASS_IN,szbuff);
IDNS_Start(m_pDns,this);
const AEEDNSResponse * pDnsResponse = NULL;
IDNS_GetResponse(pMe->m_pDns, &pDnsResponse);
…………………………………………………………..
………………………………………………………..
}
m_pDns=NULL;
}
{
RemoveEntry(ptr);
{
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/118606.html原文链接:https://javaforall.cn