Bug 730521 - Fix memory leak and needless memory allocation. r=ajuma
authorBenoit Girard <b56girard@gmail.com>
Fri, 24 Feb 2012 21:51:14 -0500
changeset 89256 e1c388532626f081c1fcf8f6f7216c7ed7d8bbb5
parent 89255 e1763649ed9472d940219b7fddfba7366117158f
child 89257 f307c1c0abedb5ba774e98e6d2f65a7e82991462
push id22242
push userkgupta@mozilla.com
push dateWed, 14 Mar 2012 15:19:09 +0000
treeherdermozilla-central@936ef50fa498 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersajuma
bugs730521
milestone13.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 730521 - Fix memory leak and needless memory allocation. r=ajuma
widget/android/nsWindow.cpp
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -1166,17 +1166,17 @@ nsWindow::OnDraw(AndroidGeckoEvent *ae)
 
 #if 0
     // BEGIN HACK: gl layers
     nsPaintEvent event(true, NS_PAINT, this);
     nsIntRect tileRect(0, 0, gAndroidBounds.width, gAndroidBounds.height);
     event.region = tileRect;
 #endif
 
-    static unsigned char *bits2 = new unsigned char[32 * 32 * 2];
+    static unsigned char bits2[32 * 32 * 2];
     nsRefPtr<gfxImageSurface> targetSurface =
         new gfxImageSurface(bits2, gfxIntSize(32, 32), 32 * 2,
                             gfxASurface::ImageFormatRGB16_565);
 
 #if 0
     nsRefPtr<gfxContext> ctx = new gfxContext(targetSurface);
     AutoLayerManagerSetup setupLayerManager(this, ctx, BasicLayerManager::BUFFER_NONE);