Commit d89a59e
authored
Address a potential memory leak when storing hooks instances (#66)
From Ruff:
> Using the functools.lru_cache and functools.cache decorators on methods can lead to memory leaks, as the global cache will retain a reference to the instance, preventing it from being garbage collected.1 parent 9338ca0 commit d89a59e
2 files changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
1172 | 1173 | | |
1173 | 1174 | | |
1174 | 1175 | | |
| 1176 | + | |
1175 | 1177 | | |
1176 | 1178 | | |
1177 | 1179 | | |
| |||
1183 | 1185 | | |
1184 | 1186 | | |
1185 | 1187 | | |
1186 | | - | |
| 1188 | + | |
1187 | 1189 | | |
1188 | 1190 | | |
1189 | 1191 | | |
1190 | | - | |
1191 | | - | |
1192 | | - | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
1193 | 1195 | | |
1194 | 1196 | | |
1195 | 1197 | | |
| |||
1206 | 1208 | | |
1207 | 1209 | | |
1208 | 1210 | | |
| 1211 | + | |
1209 | 1212 | | |
1210 | 1213 | | |
1211 | 1214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| |||
0 commit comments