#NEWLINE# def destroy( self ) : #NEWLINE# #INDENT# ' A reimplemented destructor.\n\n        This method will ensure that the instantiated tempalte items are\n        destroyed and that any potential reference cycles are released.\n\n        ' #NEWLINE# parent = self . parent #NEWLINE# destroy_items = ( ( parent is None ) or ( not parent . is_destroyed ) ) #NEWLINE# super ( DynamicTemplate , self ) . destroy ( ) #NEWLINE# if destroy_items : #NEWLINE# #INDENT# for item in self . _items : #NEWLINE# #INDENT# if ( not item . is_destroyed ) : #NEWLINE# #INDENT# item . destroy ( ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# del self . data #NEWLINE# del self . tagged #NEWLINE# if ( self . _update_task is not None ) : #NEWLINE# #INDENT# self . _update_task . unschedule ( ) #NEWLINE# del self . _update_task #NEWLINE# #UNINDENT# del self . _items