public void StartForSubject <T>(T subject) { var presenter = _applicationController.Open(subject, _context.HistoryManager); try { presenter.Edit(subject); } catch (Exception) { //exception while loading the subject. We need to close the presenter to avoid memory leaks _applicationController.Close(subject); throw; } }
private void remove(CurveChart chart) { _applicationController.Close(chart); _context.CurrentProject.RemoveChart(chart); _eventPublisher.PublishEvent(new ChartDeletedEvent(chart)); }