Hi Georgi, On 2013-11-15, Georgi Guninski <gunin...@guninski.com> wrote: > Note that modification of your workaround still > leaks (probably this known/the same): > > if K(2)**(n-1)== 2 *K.one(): #leaks
Yes, it is the same underlying problem: If you want to multiply the integer "2" with the element K.one() of K, then Sage would test whether there is a coercion homomorphism from ZZ to K, would use this homomorphism to map "2" into K, and would then multiply the result (which is K(2)) by K.one(). Again, the coercion homomorphism is cached, in a way that seemingly prevents K from garbage collection (which is bad). Work-around: Do K(2)*K.one() instead of 2*K.one(). Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.