Right now, this will leak the memory for the Element and Text objects each time we use generated content. I think we need to add a new type LayoutPseudoNode<T> that contains an AbstractNode, and has a destructor that frees the memory - the new fields in LayoutPrivateData should be this new type.