/**
  * Delete references 
  *
  * @static
  */
 public static function deleteReferences($a_target_id)
 {
     global $ilLog;
     include_once './Services/ContainerReference/classes/class.ilContainerReference.php';
     if (!($source_id = ilContainerReference::_lookupSourceId($a_target_id))) {
         return true;
     }
     foreach (ilObject::_getAllReferences($source_id) as $ref_id) {
         if (!($instance = ilObjectFactory::getInstanceByRefId($ref_id, false))) {
             continue;
         }
         switch ($instance->getType()) {
             case 'crsr':
             case 'catr':
                 $instance->delete();
                 $ilLog->write(__METHOD__ . ': Deleted reference object of type ' . $instance->getType() . ' with Id ' . $instance->getId());
                 break;
             default:
                 $ilLog->write(__METHOD__ . ': Unexpected object type ' . $instance->getType() . ' with Id ' . $instance->getId());
                 break;
         }
     }
     return true;
 }