Index: webrtc/modules/desktop_capture/mouse_cursor_monitor_mac.mm |
diff --git a/webrtc/modules/desktop_capture/mouse_cursor_monitor_mac.mm b/webrtc/modules/desktop_capture/mouse_cursor_monitor_mac.mm |
index d0659107d7e70b622d40acf508c725818de27dc3..aec8eda51b4a78b616e49c8d80c21d4c564931a8 100644 |
--- a/webrtc/modules/desktop_capture/mouse_cursor_monitor_mac.mm |
+++ b/webrtc/modules/desktop_capture/mouse_cursor_monitor_mac.mm |
@@ -37,7 +37,7 @@ |
// setting. |
NSImage* PaintInCurrentContext(NSImage* source) { |
NSSize size = [source size]; |
- NSImage* new_image = [[NSImage alloc] initWithSize:size]; |
+ NSImage* new_image = [[[NSImage alloc] initWithSize:size] autorelease]; |
[new_image lockFocus]; |
NSRect frame = NSMakeRect(0, 0, size.width, size.height); |
[source drawInRect:frame |