#29 only call "delete()" when there are actually objects to delete
Merged by mikeb. Opened by mikeb.
mikeb/c3i-library fix-delete  into  master