I have a UI thread derived from CWinThread. I allocate the memory, call CreateThread() and it runs fine. I call AfxEndThread() to finish using an event and the thread closes down. The problem is that when it comes to the lines
if(m_bAutoDelete)
delete this;
it crashes on me. Ok so I override Delete() to stop it automatically deleting the memory (I know you can stop it auto deleting other ways) and make sure the memory is freed in the same thread that created it. I'm not sure if this is relevant? Still crashes.
No good, it's driving me mad.
Anyone know?
Greg
if(m_bAutoDelete)
delete this;
it crashes on me. Ok so I override Delete() to stop it automatically deleting the memory (I know you can stop it auto deleting other ways) and make sure the memory is freed in the same thread that created it. I'm not sure if this is relevant? Still crashes.
No good, it's driving me mad.
Anyone know?
Greg