Skip to content

Commit

Permalink
#312: Fix memory leak in Windows default_executor implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixPetriconi committed Sep 15, 2020
1 parent 4083a1f commit ec5bc96
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v1.5.3 - 2020 -
- Fixed issues
- [#312](https://github.com/stlab/libraries/issues/312): default_executor implementation for Windows has a memory leak
- [#305](https://github.com/stlab/libraries/issues/305) stlab/concurrency/future.hpp won't compile with C++20
- [#303](https://github.com/stlab/libraries/issues/) range based stlab::when_any data race

## v1.5.2 - 2020 - February 05
- Fixed issues
- [#292](https://github.com/stlab/libraries/issues/292): What happened to our mutable lambdas?
Expand Down
3 changes: 2 additions & 1 deletion stlab/concurrency/default_executor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,10 @@ class task_system {
template <typename F>
static void CALLBACK callback_impl(PTP_CALLBACK_INSTANCE /*instance*/,
PVOID parameter,
PTP_WORK /*Work*/) {
PTP_WORK work) {
std::unique_ptr<F> f(static_cast<F*>(parameter));
(*f)();
CloseThreadpoolWork(work);
}
};

Expand Down

0 comments on commit ec5bc96

Please sign in to comment.