The txt::FontCollection contains a cache of minikin::FontCollection objects, which in turn hold a fallback provider that refers back to the txt::FontCollection. Using a weak_ptr in the fallback provider breaks the circular reference.
The txt::FontCollection contains a cache of minikin::FontCollection objects, which in turn hold a fallback provider that refers back to the txt::FontCollection. Using a weak_ptr in the fallback provider breaks the circular reference.