Skip to content

Commit ae51767

Browse files
committed
Add comment regarding reference ownership
1 parent ad78398 commit ae51767

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Python/optimizer.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ _PyOptimizer_Optimize(
191191
if (exit != NULL) {
192192
exit->executor = executor;
193193
} else {
194+
// An executor inserted into the code object now has a strong reference
195+
// to it from the code object. Thus, we don't need this reference anymore.
194196
Py_DECREF(executor);
195197
}
196198
interp->compiling = false;

0 commit comments

Comments
 (0)