task#5696 After an instance is deleted, delete all things belong to it
Merge pull request #141 from caoluc/task#5696

task#5696 After an instance is deleted, delete all things belong to it