-
-
Notifications
You must be signed in to change notification settings - Fork 704
Closed
Description
At http://groups.google.com/group/sage-support/browse_thread/thread/ef01dae47c835137 a memory leak was reported.
Reason for the leak: Many different polynomial rings are created, but used only once. But since we want to have unique parents, they are all cached and thus prevented from deletion.
As Robert pointed out, using weak references enables us to both have unique parents and garbage collection.
With the patch, that should at least apply to sage 3.4.1.rc3, one can do
sage: for p in primes(2,1000000):
....: R.<x,y,z> = GF(p)[]
without running into memory problems.
See instead #715.
CC: @jpflori @zimmermann6 @vbraun
Component: commutative algebra
Keywords: polynomial ring cache weak reference
Reviewer: Simon King
Issue created by migration from https://trac.sagemath.org/ticket/5970