#9129: sqrt memory leaks
--------------------------------+-------------------------------------------
   Reporter:  zimmerma          |          Owner:  AlexGhitza
       Type:  defect            |         Status:  new       
   Priority:  critical          |      Milestone:  sage-5.0  
  Component:  basic arithmetic  |       Keywords:  sd35.5    
Work_issues:                    |       Upstream:  N/A       
   Reviewer:                    |         Author:            
     Merged:                    |   Dependencies:            
--------------------------------+-------------------------------------------

Comment(by burcin):

 Replying to [comment:20 zimmerma]:

 > In all cases there is no memory leak for exact powers, but there is for
 inexact powers.
 > Thus I strongly suspect some special code that detects exact powers, but
 where is it?

 The `__pow__` method of rational numbers. :) When computing `2^(1/2)`,
 `Integer.__pow__` delegates the operation to `Rational.__pow__`. If the
 result is not exact, `Rational.__pow__` returns a symbolic expression.

 This should really be tested with the patch at #8659, which eliminates the
 need to call `Number_T::pow()` twice. Even with that patch, the leak is
 still there however.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9129#comment:23>
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.

Reply via email to