Skip to content

Commit 766e7f1

Browse files
authored
pythongh-135953: Fix refleak in cache method (python#138721)
1 parent 137519a commit 766e7f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/profiling/sampling/stack_collector.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,9 @@ def export(self, filename):
8585

8686
print(f"Flamegraph saved to: {filename}")
8787

88+
@staticmethod
8889
@functools.lru_cache(maxsize=None)
89-
def _format_function_name(self, func):
90+
def _format_function_name(func):
9091
filename, lineno, funcname = func
9192

9293
if len(filename) > 50:

0 commit comments

Comments
 (0)