diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-24 18:50:15 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-24 18:50:15 +0000 |
commit | 9f7c4fdc2d5fab8cca68ddb50217db9b62b525e3 (patch) | |
tree | 2379f9b7fa6cd9ffff3a86039f55b5ddb66d247e /net/flip/flip_io_buffer.h | |
parent | 562d8c4bc0559df9e3265430f8903ee5bcccdbe2 (diff) | |
download | chromium_src-9f7c4fdc2d5fab8cca68ddb50217db9b62b525e3.zip chromium_src-9f7c4fdc2d5fab8cca68ddb50217db9b62b525e3.tar.gz chromium_src-9f7c4fdc2d5fab8cca68ddb50217db9b62b525e3.tar.bz2 |
Flip: Fix a bunch of leaks.
FlipIOBuffer::release() was broken. It called release() on scoped_refptrs which does not decrease refcount, hence it leaked IOBuffers and FlipStreams.
Redo the memory management for FlipSession. Stop using raw pointers in FlipSessionPool to hold onto FlipSession. FlipSessionPool uses scoped_refptr now to track Fli
pSessions. Instead of having FlipSession call Release() on itself, it now calls FlipSessionPool to remove itself from the pool when the tcp connection is closed.
In FlipStreamTest, manually call FlipSessionPool::Remove() since there is no tcp connection event to trigger FlipSession to remove itself.
BUG=http://crbug.com/28493
Review URL: http://codereview.chromium.org/438014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32945 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/flip/flip_io_buffer.h')
-rw-r--r-- | net/flip/flip_io_buffer.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/flip/flip_io_buffer.h b/net/flip/flip_io_buffer.h index 85d9510..ffb4b3b 100644 --- a/net/flip/flip_io_buffer.h +++ b/net/flip/flip_io_buffer.h @@ -30,10 +30,7 @@ class FlipIOBuffer { // Accessors. IOBuffer* buffer() const { return buffer_; } size_t size() const { return buffer_->size(); } - void release() { - buffer_.release(); - stream_.release(); - } + void release(); int priority() const { return priority_; } const scoped_refptr<FlipStream>& stream() const { return stream_; } |