Skip to content

Commit 5e4712f

Browse files
authored
Merge pull request #41956 from atrick/fix-ptr-reset
Fix a minor (1 per process) leak in AccessEnforcementSelection
2 parents 1e2b94e + 1c07c50 commit 5e4712f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SILOptimizer/Mandatory/AccessEnforcementSelection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ void AccessEnforcementSelection::run() {
614614
closureOrder.compute();
615615

616616
dynamicCaptures = std::make_unique<DynamicCaptures>(closureOrder);
617-
SWIFT_DEFER { dynamicCaptures.release(); };
617+
SWIFT_DEFER { dynamicCaptures.reset(); };
618618

619619
for (SILFunction *function : closureOrder.getTopDownFunctions()) {
620620
this->processFunction(function);

0 commit comments

Comments
 (0)