Commit c0fd4404 authored by Ge Jun's avatar Ge Jun

Add virtual destructors to IReader and IWriter

parent d9e688ac
...@@ -26,6 +26,8 @@ namespace butil { ...@@ -26,6 +26,8 @@ namespace butil {
// The simplest implementation is to embed a file descriptor and read from it. // The simplest implementation is to embed a file descriptor and read from it.
class IReader { class IReader {
public: public:
virtual ~IReader() {}
// Semantics of parameters and return value are same as readv(2) except that // Semantics of parameters and return value are same as readv(2) except that
// there's no `fd'. // there's no `fd'.
virtual ssize_t ReadV(const iovec* iov, int iovcnt) = 0; virtual ssize_t ReadV(const iovec* iov, int iovcnt) = 0;
...@@ -35,6 +37,8 @@ public: ...@@ -35,6 +37,8 @@ public:
// The simplest implementation is to embed a file descriptor and writev into it. // The simplest implementation is to embed a file descriptor and writev into it.
class IWriter { class IWriter {
public: public:
virtual ~IWriter() {}
// Semantics of parameters and return value are same as writev(2) except that // Semantics of parameters and return value are same as writev(2) except that
// there's no `fd'. // there's no `fd'.
// WriteV is required to submit data gathered by multiple appends in one // WriteV is required to submit data gathered by multiple appends in one
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment