]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/timercmn.cpp
Fix memory leak by letting the base class version handle the
[wxWidgets.git] / src / common / timercmn.cpp
index 7371b1ffbf22384217c2e5bd0162fddd4442b8fd..369e646729ff469633da29a005e9b0c3920dd12b 100644 (file)
@@ -7,7 +7,7 @@
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
 //              (c) 1999 Guillermo Rodriguez <guille@iies.es>
-// Licence:     wxWindows licence
+// Licence:     wxWidgets licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
@@ -18,7 +18,7 @@
 // wxWin headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "timerbase.h"
 #endif
 
@@ -32,6 +32,7 @@
 #if wxUSE_TIMER
 
 #ifndef WX_PRECOMP
+    #include "wx/timer.h"
 #endif
 
 // ----------------------------------------------------------------------------
@@ -56,6 +57,7 @@ void wxTimerBase::Notify()
     wxCHECK_RET( m_owner, _T("wxTimer::Notify() should be overridden.") );
 
     wxTimerEvent event(m_idTimer, m_milli);
+    event.SetEventObject(this);
     (void)m_owner->ProcessEvent(event);
 }