#5970: [with patch, needs review] Weak references in Polynomial Ring cache
---------------------------------+------------------------------------------
Reporter: SimonKing | Owner: malb
Type: defect | Status: new
Priority: major | Milestone: sage-3.4.2
Component: commutative algebra | Keywords: polynomial ring cache weak
reference
---------------------------------+------------------------------------------
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.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5970>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---