I am creating an AttributedString which I then create a TextLayout from. This TextLayout is stored in a vector (which will be rendered at a later time) which I would like to clear sometimes (ex. when I exit the app). I see no way to "delete" the TextLayouts that will fix this issue (leaking thousands of instances of class Glyph). The destructor for TextLayout does not do anything. How do I properly dispose of these?
No, those classes don't leak.
If you've got a leak then you must be failing to manage the lifetime of some high-level object in your own code. You're probably leaking a TextLayout.