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

Unified Diff: net/base/io_buffer.h

Issue 20099: Fix a memory leak on the async resource handler. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 | « chrome/browser/renderer_host/async_resource_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/io_buffer.h
===================================================================
--- net/base/io_buffer.h (revision 9177)
+++ net/base/io_buffer.h (working copy)
@@ -5,6 +5,7 @@
#ifndef NET_BASE_IO_BUFFER_H_
#define NET_BASE_IO_BUFFER_H_
+#include "base/logging.h"
#include "base/ref_counted.h"
namespace net {
@@ -13,7 +14,9 @@
// easier asynchronous IO handling.
class IOBuffer : public base::RefCountedThreadSafe<IOBuffer> {
public:
+ IOBuffer() : data_(NULL) {}
explicit IOBuffer(int buffer_size) {
+ DCHECK(buffer_size);
data_ = new char[buffer_size];
}
explicit IOBuffer(char* buffer) : data_(buffer) {}
« no previous file with comments | « chrome/browser/renderer_host/async_resource_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698