IORequests leaked their IOBuffers.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26742 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-08-02 20:51:59 +00:00
parent c421c138b6
commit 7cc9a52df8
2 changed files with 10 additions and 0 deletions

View File

@ -65,6 +65,13 @@ IOBuffer::Create(size_t count)
}
void
IOBuffer::Delete()
{
free(this);
}
void
IOBuffer::SetVecs(size_t firstVecOffset, const iovec* vecs, uint32 count,
size_t length, uint32 flags)
@ -508,6 +515,7 @@ IORequest::~IORequest()
{
mutex_lock(&fLock);
DeleteSubRequests();
fBuffer->Delete();
mutex_destroy(&fLock);
}

View File

@ -29,6 +29,7 @@ typedef struct IOOperation io_operation;
class IOBuffer : public DoublyLinkedListLinkImpl<IOBuffer> {
public:
static IOBuffer* Create(size_t count);
void Delete();
bool IsVirtual() const { return !fPhysical; }
bool IsPhysical() const { return fPhysical; }
@ -55,6 +56,7 @@ public:
void UnlockMemory(team_id team, bool isWrite);
private:
IOBuffer();
~IOBuffer();
// not implemented
void _UnlockMemory(team_id team, size_t count,