-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mem_tg: refactor tg_test() to use std::vector for channels
Replace manual memory allocation using new[] and delete[] with std::vector, which avoids unintended memory leaks. Drop unneeded vectors for per-thread promise and tg_exe, which may be stored as local variables inside the lambda function. The lambda is declared as mutable to permit moving the promise. Signed-off-by: Peter Colberg <peter.colberg@intel.com>
- Loading branch information
Showing
1 changed file
with
22 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters