Click here to Skip to main content
15,902,938 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Windows Shutdown [modified] Pin
hxhl9514-Mar-09 12:08
hxhl9514-Mar-09 12:08 
Question[Message Deleted] Pin
mini_25068914-Mar-09 7:56
mini_25068914-Mar-09 7:56 
AnswerRe: help me!!!!!!!! Pin
Stuart Dootson14-Mar-09 8:00
professionalStuart Dootson14-Mar-09 8:00 
GeneralRe: help me!!!!!!!! Pin
NeoAks00714-Mar-09 8:04
NeoAks00714-Mar-09 8:04 
AnswerRe: help me!!!!!!!! Pin
NeoAks00714-Mar-09 8:02
NeoAks00714-Mar-09 8:02 
QuestionHow to delete handles of a thread created with AfxBeginThread Pin
keret14-Mar-09 7:29
keret14-Mar-09 7:29 
AnswerRe: How to delete handles of a thread created with AfxBeginThread Pin
Stuart Dootson14-Mar-09 7:58
professionalStuart Dootson14-Mar-09 7:58 
GeneralRe: How to delete handles of a thread created with AfxBeginThread Pin
keret14-Mar-09 9:51
keret14-Mar-09 9:51 
Thanks!

1. This didn't compile, error was:
error C2664: 'ThreadInfo::ThreadInfo(const ThreadInfo &)' : cannot convert parameter 1 from 'ThreadInfo *' to 'const ThreadInfo &'

but I used the following:

ThreadInfo *pInfo = reinterpret_cast<threadinfo> (pParam);
ThreadInfo info = *pInfo;
delete pInfo;</threadinfo>


And it seems to work. The 748B and 160B blocks are eliminated.

2. I had a threads vector earlier, but I didn't use it. Now I use it as you recommended, but I use ON_WM_DESTROY (I switched off the close button):

void CFredoDlg::OnDestroy()
{
	//delete threads;
	for(vector<handle>::size_type i = 0; i < threads.size(); i++)
	{
		threads.erase(threads.begin() + i);
	}

}</handle>


But the 68B and 46B blocks are still there. Now I will try to find a way to terminate the threads. If you have a solution for that, don't keep it!
GeneralRe: How to delete handles of a thread created with AfxBeginThread Pin
Stuart Dootson14-Mar-09 10:36
professionalStuart Dootson14-Mar-09 10:36 
GeneralRe: How to delete handles of a thread created with AfxBeginThread Pin
keret14-Mar-09 11:17
keret14-Mar-09 11:17 
GeneralRe: How to delete handles of a thread created with AfxBeginThread Pin
Stuart Dootson14-Mar-09 11:52
professionalStuart Dootson14-Mar-09 11:52 
GeneralRe: How to delete handles of a thread created with AfxBeginThread Pin
keret15-Mar-09 4:03
keret15-Mar-09 4:03 
GeneralRe: How to delete handles of a thread created with AfxBeginThread Pin
Stuart Dootson15-Mar-09 6:07
professionalStuart Dootson15-Mar-09 6:07 
GeneralRe: How to delete handles of a thread created with AfxBeginThread Pin
keret15-Mar-09 9:55
keret15-Mar-09 9:55 
QuestionTemplate Class Issues in C++. Pin
NeoAks00714-Mar-09 7:24
NeoAks00714-Mar-09 7:24 
AnswerRe: Template Class issues in C++. Pin
N a v a n e e t h14-Mar-09 7:31
N a v a n e e t h14-Mar-09 7:31 
GeneralRe: Template Class issues in C++. Pin
NeoAks00714-Mar-09 7:38
NeoAks00714-Mar-09 7:38 
GeneralRe: Template Class issues in C++. Pin
N a v a n e e t h14-Mar-09 7:45
N a v a n e e t h14-Mar-09 7:45 
QuestionRe: Template Class issues in C++. Pin
NeoAks00714-Mar-09 7:50
NeoAks00714-Mar-09 7:50 
AnswerRe: Template Class issues in C++. Pin
Stuart Dootson14-Mar-09 8:07
professionalStuart Dootson14-Mar-09 8:07 
AnswerRe: Template Class issues in C++. Pin
N a v a n e e t h14-Mar-09 8:14
N a v a n e e t h14-Mar-09 8:14 
QuestionRe: Template Class issues in C++. Pin
NeoAks00714-Mar-09 8:32
NeoAks00714-Mar-09 8:32 
NewsRe: Template Class issues in C++. Pin
NeoAks00714-Mar-09 9:16
NeoAks00714-Mar-09 9:16 
AnswerRe: Template Class issues in C++. Pin
Stuart Dootson14-Mar-09 9:38
professionalStuart Dootson14-Mar-09 9:38 
QuestionRe: Template Class issues in C++. Pin
NeoAks00714-Mar-09 9:58
NeoAks00714-Mar-09 9:58 

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.