Fix memory leaks

This commit is contained in:
Jacob Dufault 2017-06-08 23:20:29 -07:00
parent 598b53efff
commit 41d8cd9a0c
4 changed files with 6 additions and 0 deletions

View File

@ -79,3 +79,5 @@ const char* IpcIdToString(IpcId id) {
BaseIpcMessage::BaseIpcMessage(IpcId method_id)
: method_id(method_id) {}
BaseIpcMessage::~BaseIpcMessage() = default;

View File

@ -55,6 +55,7 @@ const char* IpcIdToString(IpcId id);
struct BaseIpcMessage {
const IpcId method_id;
BaseIpcMessage(IpcId method_id);
virtual ~BaseIpcMessage();
};
template <typename T>

View File

@ -101,6 +101,8 @@ MessageRegistry* MessageRegistry::instance() {
return instance_;
}
lsBaseOutMessage::~lsBaseOutMessage() = default;
void lsResponseError::Write(Writer& visitor) {
auto& value = *this;
int code2 = static_cast<int>(this->code);

View File

@ -98,6 +98,7 @@ struct MessageRegistry {
struct lsBaseOutMessage {
virtual ~lsBaseOutMessage();
virtual void Write(std::ostream& out) = 0;
};