Click here to Skip to main content
15,911,711 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalmemory leak Pin
Rage18-Jun-02 23:34
professionalRage18-Jun-02 23:34 
GeneralRe: memory leak Pin
Prem Kumar18-Jun-02 23:41
Prem Kumar18-Jun-02 23:41 
GeneralRe: memory leak Pin
Rage18-Jun-02 23:45
professionalRage18-Jun-02 23:45 
GeneralRe: memory leak Pin
Prem Kumar18-Jun-02 23:51
Prem Kumar18-Jun-02 23:51 
GeneralRe: memory leak Pin
Rage19-Jun-02 0:07
professionalRage19-Jun-02 0:07 
GeneralRe: memory leak Pin
Prem Kumar19-Jun-02 0:11
Prem Kumar19-Jun-02 0:11 
GeneralRe: memory leak Pin
JohnnyG19-Jun-02 3:16
JohnnyG19-Jun-02 3:16 
GeneralDebug assertion failed Pin
Rsh18-Jun-02 23:24
Rsh18-Jun-02 23:24 
How do i release the memory after reading from the CList from the head position.If i run the folowing code i get Debug assertion failed at the delete statement.

void CPLayerApp::LockIt()
{
unsigned char data[10], mCnt,mMid;
CMessage* pMess;
CSingleLock singleLock(&m_SyncLock.m_mutex);

CString str="";
while(1)
{

if(m_messList.GetCount() != 0)
{
singleLock.Lock();
pMess = &m_messList.GetAt(m_messList.GetHeadPosition());//m_messList is a CList pointer

mCnt = pMess->m_cnt;
mMid = pMess->m_mid;
pMess->GetData(data);
POSITION pos = m_messList.GetHeadPosition();

m_messList.RemoveHead();
delete pos;
singleLock.Unlock();
if(data[0] == 0x10)
{
str.Format("%0x",data[0]);
AfxMessageBox(str);
break;
}
}
Sleep(200);

}


Rsh
GeneralRe: Debug assertion failed Pin
Rage18-Jun-02 23:36
professionalRage18-Jun-02 23:36 
GeneralRe: Debug assertion failed Pin
Prem Kumar18-Jun-02 23:45
Prem Kumar18-Jun-02 23:45 
GeneralRe: Debug assertion failed Pin
Rsh19-Jun-02 0:00
Rsh19-Jun-02 0:00 
GeneralRe: Debug assertion failed Pin
Prem Kumar19-Jun-02 0:06
Prem Kumar19-Jun-02 0:06 
GeneralRe: Debug assertion failed Pin
Rsh19-Jun-02 0:16
Rsh19-Jun-02 0:16 
GeneralRe: Debug assertion failed Pin
Rage19-Jun-02 2:09
professionalRage19-Jun-02 2:09 
GeneralRe: Debug assertion failed Pin
Chad Koehler19-Jun-02 7:28
Chad Koehler19-Jun-02 7:28 
GeneralRe: Debug assertion failed Pin
Rsh19-Jun-02 21:37
Rsh19-Jun-02 21:37 
QuestionFloating CMDIChildFrame? Pin
Jimmy_H18-Jun-02 22:28
Jimmy_H18-Jun-02 22:28 
AnswerRe: Floating CMDIChildFrame? Pin
Jon Newman18-Jun-02 23:12
Jon Newman18-Jun-02 23:12 
GeneralRe: Floating CMDIChildFrame? Pin
Jimmy_H18-Jun-02 23:39
Jimmy_H18-Jun-02 23:39 
GeneralRe: Floating CMDIChildFrame? Pin
Jon Newman19-Jun-02 8:08
Jon Newman19-Jun-02 8:08 
GeneralRe: passing variables from VC to VB Pin
Christian Graus18-Jun-02 22:07
protectorChristian Graus18-Jun-02 22:07 
GeneralRe: passing variables from VC to VB Pin
Ghazi H. Wadi18-Jun-02 22:22
Ghazi H. Wadi18-Jun-02 22:22 
GeneralRe: passing variables from VC to VB Pin
Michael P Butler18-Jun-02 22:39
Michael P Butler18-Jun-02 22:39 
GeneralRe: passing variables from VC to VB Pin
Nish Nishant18-Jun-02 23:16
sitebuilderNish Nishant18-Jun-02 23:16 
GeneralRe: passing variables from VC to VB Pin
Michael P Butler19-Jun-02 0:07
Michael P Butler19-Jun-02 0:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.