Closed edd8e884-f507-429a-b577-5d554626c0fe closed 5 years ago
After the fix:
sage: G = [g for g in graphs.nauty_geng("12 16:16 -Ct")]
sage: for _ in range(20):
....: for g in G:
....: A = g.incidence_matrix()
....: M = Matroid(A, ring = GF(2))
....: if M.is_connected():
....: pass
....: print(get_memory_usage())
....:
8462.484375
8462.484375
8462.484375
8462.484375
8462.484375
8462.484375
8462.484375
8462.484375
8462.484375
8462.484375
8462.484375
8462.484375
8462.484375
8462.484375
8462.484375
8462.484375
8462.484375
8462.484375
8462.484375
8462.484375
I am not sure whether this should be doctested.
New commits:
db6182b | #28498 : remove trailing spaces |
e9ed458 | #28498 : fix memleak |
Commit: e9ed458
Nice catch! Such memory leaks should be doctested for each code snippet (ie running the same code 100 times should not increase memory usage). I am not sure it makes sense at the level of this single function.
Reviewer: Vincent Delecroix
Sorry for making this mistake in the first place, and thanks for fixing!
Description changed:
---
+++
@@ -32,5 +32,5 @@
8612.3203125
-Siegfried is missing.
+The memory leak is because sig_free
is missing.
moving milestone to 9.0 (after release of 8.9)
Changed branch from u/tmonteil/memory_leak_in_basisexchangematroid_components to e9ed458
As reported in this ask question, there is a memory leak in
BasisExchangeMatroid.components
, see:The memory leak is because
sig_free
is missing.CC: @sagetrac-Rudi @jdemeyer
Component: memleak
Author: Thierry Monteil
Branch/Commit:
e9ed458
Reviewer: Vincent Delecroix
Issue created by migration from https://trac.sagemath.org/ticket/28498