#13447: Make libsingular multivariate polynomial rings collectable
-------------------------------------+-------------------------------------
Reporter: nbruin | Owner:
Type: defect | Status: needs_work
Priority: major | Milestone: sage-6.4
Component: memleak | Resolution:
Keywords: | Merged in:
Authors: Nils Bruin, Simon | Reviewers: Simon King
King | Work issues: Understand why
Report Upstream: None of the above | sometimes `new_RingWrap` needs an
- read trac for reasoning. | incref and sometimes not
Branch: | Commit:
Dependencies: #11521 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by nbruin):
I just stumbled into to this in sage/libs/singular/function.pyx:949 in
to_python:
{{{
elif rtyp == POLY_CMD:
#FIXME
res_poly = MPolynomial_libsingular(self._sage_ring)
res_poly._poly = <poly*>to_convert.data
to_convert.data = NULL
#prevent it getting free, when cleaning the leftv
return res_poly
}}}
this looks like the simple transfer of ownership of a reference here, but
if some of the comments on this ticket quoting Schoenemann are correct and
Singular indeed has a mix of refcounted and non-refcounted uses (depending
on whether objects are actively interfaced in the interpreter or not) then
this step might need attention: the leftv arriving here almost certainly
is coming from the interpreter (via !SingularFunction) and the res_poly
object possibly shouldn't be considered as such.
Any new attempt at resolving this ticket should probably look into this
bit of code too.
--
Ticket URL: <http://trac.sagemath.org/ticket/13447#comment:109>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.