Bug 579206 - Fix leak in draw coalescing code, r=vlad
authorMichael Wu <mwu@mozilla.com>
Fri, 16 Jul 2010 11:25:38 -0700
changeset 47828 57a696a3f5580e594e168ece70f7fa246dd99dd3
parent 47827 525cbac0423c60470e3bb8959f961a9680008258
child 47829 06068c84b575f25f11169f5cd2d42ea10c65a92b
push idunknown
push userunknown
push dateunknown
reviewersvlad
bugs579206
milestone2.0b2pre
Bug 579206 - Fix leak in draw coalescing code, r=vlad
widget/src/android/nsAppShell.cpp
--- a/widget/src/android/nsAppShell.cpp
+++ b/widget/src/android/nsAppShell.cpp
@@ -178,16 +178,17 @@ nsAppShell::ProcessNextNativeEvent(PRBoo
         {
             // skip this draw, since there's a later one already in the queue.. this will let us
             // deal with sequences that look like:
             //   MOVE DRAW MOVE DRAW MOVE DRAW
             // and end up with just
             //   MOVE DRAW
             // when we process all the events.
             RemoveNextEvent();
+            delete nextEvent;
 
 #if defined(ANDROID_DEBUG_EVENTS)
             ALOG("# Removing DRAW event (%d outstanding)", mNumDraws);
 #endif
 
             nextEvent = PeekNextEvent();
             nextType = nextEvent->Type();
         }