#13447: Make libsingular multivariate polynomial rings collectable
----------------------------------------------------------------+-----------
Reporter: nbruin |
Owner:
Type: defect |
Status: needs_review
Priority: major |
Milestone: sage-5.4
Component: memleak |
Resolution:
Keywords: | Work
issues:
Report Upstream: None of the above - read trac for reasoning. |
Reviewers: Simon King
Authors: Nils Bruin, Simon King | Merged
in:
Dependencies: #11521 |
Stopgaps:
----------------------------------------------------------------+-----------
Comment (by SimonKing):
Here is one comment of Hans on the following lines of the patch:
{{{
global currRingHdl
if currRingHdl == NULL and currRing!=NULL:
# Create an invalid mock ring - it would not be possible
# to make that ring currRing!
# The only aim is to create currRingHdl
currRingHdl = enterid("my_awesome_sage_ring", 0,
RING_CMD, &IDROOT, 1)
# Now we assign proper data to currRingHdl
rDelete(currRingHdl.data.uring)
currRingHdl.data.uring = singular_ring_reference(currRing)
}}}
He says that it is ok like that. However, it would be better to do
{{{
global currRingHdl
if currRingHdl == NULL and currRing!=NULL:
# Create an invalid mock ring - it would not be possible
# to make that ring currRing!
# The only aim is to create currRingHdl
currRingHdl = enterid("my_awesome_sage_ring", 0, RING_CMD,
&IDROOT, 0)
# Now we assign proper data to currRingHdl
currRingHdl.data.uring = singular_ring_reference(currRing)
}}}
I'll try it...
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13447#comment:61>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
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.