]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/timerunx.cpp
fix memory leak while testing for correct Clone() implementation (closes #10304)
[wxWidgets.git] / src / unix / timerunx.cpp
index c3c563af04ff219d91dfd0a8c20c31f3bf94d699..d6ee503df5cf7210437ef27227140b9479f5a706 100644 (file)
@@ -134,10 +134,12 @@ bool wxTimerScheduler::GetNext(wxUsecClock_t *remaining) const
     return true;
 }
 
-void wxTimerScheduler::NotifyExpired()
+bool wxTimerScheduler::NotifyExpired()
 {
     if ( m_timers.empty() )
-      return;
+      return false;
+
+    bool notified = false;
 
     const wxUsecClock_t now = wxGetLocalTimeUsec();
 
@@ -182,7 +184,10 @@ void wxTimerScheduler::NotifyExpired()
 
         // and finally notify the timer
         timer->Notify();
+        notified = true;
     }
+
+    return notified;
 }
 
 // ============================================================================