/** * I'm done with the model, free the resources. * Note: This does not free the associated record. it just nulls the reference. * (although freeing the record will free this table). */ public void free() { if (m_record != null) // First, release the record for this table { // Do not free this.getFieldList() (may be current record) m_record.setTable(null); // Don't try to free me m_record.free(); m_record = null; } } /**
super.free(); // Free fields, free table.
super.free(); // Free fields, free table.
super.free(); // Free fields, free table.
public void free() { if (m_vFieldListList != null) { for (int i = m_vFieldListList.size() - 1; i >= 0; i--) { // Step 1 - Disconnect the controls from the fields FieldList fieldList = this.getFieldList(i); if (fieldList != null) { this.disconnectControls(fieldList); if (fieldList.getOwner() == this) fieldList.free(); } } if (m_vFieldListList != null) m_vFieldListList.clear(); // Note JBaseField.free() frees all the field lists m_vFieldListList = null; } // Remember to disconnect these. TourGeekScreen TourGeekScreen = (TourGeekScreen)this.getTargetScreen(TourGeekScreen.class); this.disconnectControls(TourGeekScreen.getCurrencyRecord()); super.free(); } /**
/** * Free. */ public void free() { if (this.getFieldList(MealPlan.MEAL_PLAN_FILE) != null) { // Since the meal plan popup record is shared, I need to free it then disconnect it from the controls. this.getFieldList(MealPlan.MEAL_PLAN_FILE).free(); FieldList fieldList = this.getFieldList(); for (int iFieldSeq = 0; iFieldSeq < fieldList.getFieldCount(); iFieldSeq++) { FieldInfo field = fieldList.getField(iFieldSeq); Component component = null; int iIndex = 0; while ((component = (Component)field.getComponent(iIndex)) != null) { if (component instanceof JRemoteComboBox) if (((JRemoteComboBox)component).getRecord() == this.getFieldList(MealPlan.MEAL_PLAN_FILE)) ((JRemoteComboBox)component).setRecord(null); iIndex++; // Bump counter } } this.removeFieldList(this.getFieldList(MealPlan.MEAL_PLAN_FILE)); } super.free(); } /**