mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-29 11:01:57 +00:00
Fix memory leaks
This commit is contained in:
parent
598b53efff
commit
41d8cd9a0c
@ -79,3 +79,5 @@ const char* IpcIdToString(IpcId id) {
|
|||||||
|
|
||||||
BaseIpcMessage::BaseIpcMessage(IpcId method_id)
|
BaseIpcMessage::BaseIpcMessage(IpcId method_id)
|
||||||
: method_id(method_id) {}
|
: method_id(method_id) {}
|
||||||
|
|
||||||
|
BaseIpcMessage::~BaseIpcMessage() = default;
|
@ -55,6 +55,7 @@ const char* IpcIdToString(IpcId id);
|
|||||||
struct BaseIpcMessage {
|
struct BaseIpcMessage {
|
||||||
const IpcId method_id;
|
const IpcId method_id;
|
||||||
BaseIpcMessage(IpcId method_id);
|
BaseIpcMessage(IpcId method_id);
|
||||||
|
virtual ~BaseIpcMessage();
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
@ -101,6 +101,8 @@ MessageRegistry* MessageRegistry::instance() {
|
|||||||
return instance_;
|
return instance_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lsBaseOutMessage::~lsBaseOutMessage() = default;
|
||||||
|
|
||||||
void lsResponseError::Write(Writer& visitor) {
|
void lsResponseError::Write(Writer& visitor) {
|
||||||
auto& value = *this;
|
auto& value = *this;
|
||||||
int code2 = static_cast<int>(this->code);
|
int code2 = static_cast<int>(this->code);
|
||||||
|
@ -98,6 +98,7 @@ struct MessageRegistry {
|
|||||||
|
|
||||||
|
|
||||||
struct lsBaseOutMessage {
|
struct lsBaseOutMessage {
|
||||||
|
virtual ~lsBaseOutMessage();
|
||||||
virtual void Write(std::ostream& out) = 0;
|
virtual void Write(std::ostream& out) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user