Changes between Initial Version and Version 1 of Ticket #13378, comment 9


Ignore:
Timestamp:
01/15/13 08:44:18 (9 years ago)
Author:
SimonKing
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13378, comment 9

    initial v1  
    99        ...
    1010}}}
    11 without checking whether P really is a parent or type. And that means trouble, if P happens to be, say, an element (Yes, that did occur! But I don't know where I had originally found it). See the ticket description for an example.
     11without checking whether P really is a category object or type. And that means trouble, if P happens to be, say, an element (Yes, that did occur! But I don't know where I had originally found it). See the ticket description for an example.
    1212
    13 Of course, if P is neither a parent nor a type, then there is no coercion map from P to self. And as you know, the coercion framework would not only cache a coercion map from P to self, but it would also cache the non-existence of a coercion map from P to self.
     13Of course, if P is neither a category object nor a type, then there is no coercion map from P to self. And as you know, the coercion framework would not only cache a coercion map from P to self, but it would also cache the non-existence of a coercion map from P to self.
    1414
    1515So, the trouble starts if P runs over many elements that are not weakreffable. For each element P, the coercion framework would store the value ``None`` in self's coercion dictionary. And since the element is not weakreffable, the entry will stay in cache forever, and I think this may even prevent self from being garbage collected.