KillTimer() has not been after destroying the CWnd.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi,

I have CView inherited class. After creating the window, I call SetTimer( ,
, NULL) to set a periodical timer. When the window is no longer need, I just
call DestroyWindow() to destroy the window but without calling KillTimer() to
kill timer. Is this code safe?

Thanks in advance.

Regards,
lauch2.
 
Hallo lauch2!
I have CView inherited class. After creating the window, I call SetTimer( ,
, NULL) to set a periodical timer. When the window is no longer need, I just
call DestroyWindow() to destroy the window but without calling KillTimer() to
kill timer. Is this code safe?

Yes! Timers are directly associated with the window and are destryoed
when the window is destroyed.
 
Back
Top