Make sure that the TemplateObject is correctly destroyed (no ring references).