Memory deallocation problem
Hi,
I have a thread that contains pointers in them. I use CreateThread(...) to create and launch the thread and TerminateThread() to kill it. The pointers are set up as follows:
Code:
CVideo* pThis = (CVideo*)pSimulatorDlg;
CWnd* pLabel = pThis->theTab->GetDlgItem(IDC_FREE_LABEL);
CProgressCtrl* pProgress = (CProgressCtrl*)pThis->theTab->GetDlgItem(IDC_FREE_PROGRESS);
CWnd* pStats = pThis->theTab->GetDlgItem(IDC_FREE_STATS);
My question is can those pointers cause memory leakage when the program exits and should I have done something special before killing the thread. Thank you
Amish