public void deleteSecGroupByIdIdx(long ClusterId, int SecGroupId) {
   CFSecuritySecGroupPKey pkey =
       ((ICFSecuritySchema) schema.getBackingStore()).getFactorySecGroup().newPKey();
   pkey.setRequiredClusterId(ClusterId);
   pkey.setRequiredSecGroupId(SecGroupId);
   ICFSecuritySecGroupObj obj = readSecGroup(pkey);
   if (obj != null) {
     ICFSecuritySecGroupEditObj editObj = (ICFSecuritySecGroupEditObj) obj.getEdit();
     boolean editStarted;
     if (editObj == null) {
       editObj = (ICFSecuritySecGroupEditObj) obj.beginEdit();
       if (editObj != null) {
         editStarted = true;
       } else {
         editStarted = false;
       }
     } else {
       editStarted = false;
     }
     if (editObj != null) {
       editObj.delete();
       if (editStarted) {
         editObj.endEdit();
       }
     }
     obj.forget(true);
   }
 }
 public void minimizeMemory() {
   allSecGroup = null;
   indexByClusterIdx = null;
   indexByUNameIdx = null;
   List<ICFSecuritySecGroupObj> toForget = new LinkedList<ICFSecuritySecGroupObj>();
   ICFSecuritySecGroupObj cur = null;
   Iterator<ICFSecuritySecGroupObj> iter = members.values().iterator();
   while (iter.hasNext()) {
     cur = iter.next();
     if (cur.getEdit() == null) {
       toForget.add(cur);
     }
   }
   iter = toForget.iterator();
   while (iter.hasNext()) {
     cur = iter.next();
     cur.forget();
   }
 }