#1001 Add a method to destroy widgets.