Changes between Initial Version and Version 1 of Ticket #13378, comment 9
- Timestamp:
- 01/15/13 08:44:18 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #13378, comment 9
initial v1 9 9 ... 10 10 }}} 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.11 without 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. 12 12 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.13 Of 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. 14 14 15 15 So, 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.