Beispiel #1
0
 public static void ExecuteProgram(ITrain train)
 {
     RemoteControl remoteControl = new RemoteControl();
     train.Control = remoteControl;
     train.Start();
     train.Stop();
     //train.Control = null;     // memory leak
 }
Beispiel #2
0
        public static void ExecuteProgram(ITrain train)
        {
            RemoteControl remoteControl = new RemoteControl();

            train.Control = remoteControl;
            train.Start();
            train.Stop();
            //train.Control = null;     // memory leak
        }