MsgHdr add Destroy
This commit is contained in:
parent
5a4e95e901
commit
4e1a34704d
@ -23,6 +23,14 @@ namespace f8
|
|||||||
return hdr;
|
return hdr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MsgHdr::Destroy(MsgHdr* hdr)
|
||||||
|
{
|
||||||
|
if (hdr->buf) {
|
||||||
|
free((void*)hdr->buf);
|
||||||
|
}
|
||||||
|
free((void*)hdr);
|
||||||
|
}
|
||||||
|
|
||||||
int Net_GetMessageId(::google::protobuf::Message& msg)
|
int Net_GetMessageId(::google::protobuf::Message& msg)
|
||||||
{
|
{
|
||||||
std::string msgname;
|
std::string msgname;
|
||||||
|
@ -94,6 +94,7 @@ namespace f8
|
|||||||
const void* user_data = nullptr;
|
const void* user_data = nullptr;
|
||||||
|
|
||||||
MsgHdr* Clone();
|
MsgHdr* Clone();
|
||||||
|
static void Destroy(MsgHdr* hdr);
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef MATCHVS
|
#ifdef MATCHVS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user