We help IT Professionals succeed at work.

Thread deleting

holdkoros
holdkoros asked
on
Will happen any bad things, if I delete a thread, and not call AfxEndThread within the thread?
Comment
Watch Question

Commented:
It depends on what you mean by "bad things".  Since the thread has no opportunity to clean up anything it's doing, any resources or memory that the thread has open will remain open or allocated and your application may leak.
mco

Commented:
It can get worse than that: if your thread was exeuting in system code when aborted (e.g. GDI, C runtime allocating code), you are liable to crash.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.