Skip to content

Commit e75d4ee

Browse files
authored
Merge pull request serizba#104 from ljn917/patch-1
`context::operator=()` leaks `tfe_context`
2 parents d892645 + c937fd9 commit e75d4ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/cppflow/context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ namespace cppflow {
7979
}
8080

8181
inline context& context::operator=(context&& ctx) noexcept {
82-
tfe_context = std::exchange(ctx.tfe_context, nullptr);
82+
tfe_context = std::exchange(ctx.tfe_context, tfe_context);
8383
return *this;
8484
}
8585

0 commit comments

Comments
 (0)