Skip to content

Commit 1c07c50

Browse files
committed
Fix a minor (1 per process) leak in AccessEnforcementSelection
This fixes a commit from a few days ago where I meant to call unique_ptr::reset() instead of unique_ptr::release() and apparently didn't notice the compiler warning.
1 parent 1e2b94e commit 1c07c50

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)