| 1 | '''Issue''' |
| 2 | RenderObject lifetimes |
| 3 | RO destroyed in Node::detach(), which is badly named. |
| 4 | |
| 5 | Complications |
| 6 | anonymous containers |
| 7 | continuations |
| 8 | multicol stuff |
| 9 | who else is pointing at you |
| 10 | float lists in lines |
| 11 | continuations |
| 12 | line boxes around inline replaced elements |
| 13 | |
| 14 | Would like a WeakPtr system (but high memory cost) |
| 15 | |
| 16 | Why do you use RefPtr |
| 17 | secondary use can hold a ref |
| 18 | |
| 19 | Can we use OwnPtr? |
| 20 | just helps you not leak, and documents explicit ownership |
| 21 | we don't use OwnPtrs because of RenderArenas |
| 22 | are they still a useful opt? Need to measure |
| 23 | |
| 24 | RO guard is like a debug-only RefPtr. Maybe that's how it should be implemented. |
| 25 | |
| 26 | Two approaches |
| 27 | 1. Global "I'm holding a ref to some renderer, so don't destroy any". Addresses risk of being too specific |
| 28 | 2. Smart-pointer type object: RenderPtr |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | '''Actionable things''' |
| 34 | Rename the detach() method |