Extract some definitions to msgr_op.{cpp,h}

This commit is contained in:
Vitaliy Filippov
2021-04-03 14:36:04 +03:00
parent 54f2353f24
commit 829381b335
5 changed files with 207 additions and 189 deletions
+22
View File
@@ -0,0 +1,22 @@
// Copyright (c) Vitaliy Filippov, 2019+
// License: VNPL-1.1 or GNU GPL-2.0+ (see README.md for details)
#include <assert.h>
#include "msgr_op.h"
osd_op_t::~osd_op_t()
{
assert(!bs_op);
assert(!op_data);
if (rmw_buf)
{
free(rmw_buf);
}
if (buf)
{
// Note: reusing osd_op_t WILL currently lead to memory leaks
// So we don't reuse it, but free it every time
free(buf);
}
}