Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
91156107
Commit
91156107
authored
Nov 21, 2020
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix potential leak on emplace_back, close #1170
parent
b9e78a66
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
libcaf_core/caf/scheduler/coordinator.hpp
libcaf_core/caf/scheduler/coordinator.hpp
+2
-1
libcaf_core/src/message_builder.cpp
libcaf_core/src/message_builder.cpp
+2
-1
No files found.
libcaf_core/caf/scheduler/coordinator.hpp
View file @
91156107
...
...
@@ -67,7 +67,8 @@ protected:
workers_
.
reserve
(
num
);
// Create worker instanes.
for
(
size_t
i
=
0
;
i
<
num
;
++
i
)
workers_
.
emplace_back
(
new
worker_type
(
i
,
this
,
init
,
max_throughput_
));
workers_
.
emplace_back
(
std
::
make_unique
<
worker_type
>
(
i
,
this
,
init
,
max_throughput_
));
// Start all workers.
for
(
auto
&
w
:
workers_
)
w
->
start
();
...
...
libcaf_core/src/message_builder.cpp
View file @
91156107
...
...
@@ -89,7 +89,8 @@ message_builder& message_builder::append_from(const caf::message& msg,
auto
*
meta
=
detail
::
global_meta_object
(
tid
);
storage_size_
+=
meta
->
padded_size
;
types_
.
push_back
(
tid
);
elements_
.
emplace_back
(
new
message_builder_element_adapter
(
msg
,
index
));
elements_
.
emplace_back
(
std
::
make_unique
<
message_builder_element_adapter
>
(
msg
,
index
));
}
return
*
this
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment