Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2953)

Unified Diff: app/surface/accelerated_surface_mac.cc

Issue 3200011: Mac: Fix small leak in iosurface resizing code. (Closed)
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/surface/accelerated_surface_mac.cc
diff --git a/app/surface/accelerated_surface_mac.cc b/app/surface/accelerated_surface_mac.cc
index ef2440795c4424cbbe8dd18c0431c74a631e6f00..a3cd8b938ce0ee9295aafee621265d1d1b7386ee 100644
--- a/app/surface/accelerated_surface_mac.cc
+++ b/app/surface/accelerated_surface_mac.cc
@@ -8,6 +8,7 @@
#include "app/gfx/gl/gl_implementation.h"
#include "app/surface/io_surface_support_mac.h"
#include "base/logging.h"
+#include "base/scoped_cftyperef.h"
#include "gfx/rect.h"
AcceleratedSurface::AcceleratedSurface()
@@ -109,8 +110,9 @@ static void AddBooleanValue(CFMutableDictionaryRef dictionary,
static void AddIntegerValue(CFMutableDictionaryRef dictionary,
const CFStringRef key,
int32 value) {
- CFNumberRef number = CFNumberCreate(NULL, kCFNumberSInt32Type, &value);
- CFDictionaryAddValue(dictionary, key, number);
+ scoped_cftyperef<CFNumberRef> number(
+ CFNumberCreate(NULL, kCFNumberSInt32Type, &value));
+ CFDictionaryAddValue(dictionary, key, number.get());
}
void AcceleratedSurface::AllocateRenderBuffers(GLenum target,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698