Ignore:
Timestamp:
01/18/13 10:26:25 (9 years ago)
Author:
ascheibe
Message:

#2005

  • fixed naming of event handlers that were forgotten when the naming from experiment to job was changed
  • fixed some more memory leaks
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UnloadJobs/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs

    r9107 r9173  
    100100        progressView = null;
    101101      }
     102      DeregisterHiveExperimentEvents();
     103      DeregisterHiveTasksEvents();
    102104      base.DeregisterContentEvents();
    103105    }
     
    111113    }
    112114
    113     private void RegisterHiveJobEvents() {
     115    private void RegisterHiveTasksEvents() {
    114116      Content.HiveTasks.ItemsAdded += new CollectionItemsChangedEventHandler<HiveTask>(HiveTasks_ItemsAdded);
    115117      Content.HiveTasks.ItemsRemoved += new CollectionItemsChangedEventHandler<HiveTask>(HiveTasks_ItemsRemoved);
    116118      Content.HiveTasks.CollectionReset += new CollectionItemsChangedEventHandler<HiveTask>(HiveTasks_CollectionReset);
    117119    }
    118     private void DeregisterHiveJobEvents() {
     120    private void DeregisterHiveTasksEvents() {
    119121      Content.HiveTasks.ItemsAdded -= new CollectionItemsChangedEventHandler<HiveTask>(HiveTasks_ItemsAdded);
    120122      Content.HiveTasks.ItemsRemoved -= new CollectionItemsChangedEventHandler<HiveTask>(HiveTasks_ItemsRemoved);
     
    131133          resourceNamesTextBox.Text = string.Empty;
    132134          isPrivilegedCheckBox.Checked = false;
    133           logView.Content = null;
    134135          refreshAutomaticallyCheckBox.Checked = false;
    135136          lock (runCollectionViewLocker) {
    136137            runCollectionViewHost.Content = null;
    137138          }
     139          logView.Content = null;
     140          jobsTreeView.Content = null;
     141          hiveExperimentPermissionListView.Content = null;
     142          stateLogViewHost.Content = null;
    138143        } else {
    139144          nameTextBox.Text = Content.Job.Name;
     
    286291        if (Content != null && Content.HiveTasks != null) {
    287292          jobsTreeView.Content = Content.HiveTasks;
    288           RegisterHiveJobEvents();
     293          RegisterHiveTasksEvents();
    289294        } else {
    290295          jobsTreeView.Content = null;
     
    435440
    436441    private void nameTextBox_Validated(object sender, EventArgs e) {
    437       if (!SuppressEvents && Content.Job.Name != nameTextBox.Text)
     442      if (!SuppressEvents && Content.Job != null && Content.Job.Name != nameTextBox.Text)
    438443        Content.Job.Name = nameTextBox.Text;
    439444    }
    440445
    441446    private void resourceNamesTextBox_Validated(object sender, EventArgs e) {
    442       if (!SuppressEvents && Content.Job.ResourceNames != resourceNamesTextBox.Text)
     447      if (!SuppressEvents && Content.Job != null && Content.Job.ResourceNames != resourceNamesTextBox.Text)
    443448        Content.Job.ResourceNames = resourceNamesTextBox.Text;
    444449    }
Note: See TracChangeset for help on using the changeset viewer.