anchor.diff:          });
       });
   
  +    test('unused sources are properly garbage collected', (){
  +      expectAsyncWithReadyCheckAndTimeout(
  +        () => memoryLeakTestComplete,
  +        (){
  +          expect(lastErrorCaughtDuringTest == null, equals(true));
  +        },
  +        20);
  +      executeWhenReadyOrTimeout(
  +        () => currentTestConsumer != null,
  +        () => currentTestConsumer.runMemoryLeakSequence());
  +    });
  +
     });
   
   }
   
   
   class TestSource extends Source{
  +  final List<Massive> _massives = new List<Massive>();
   
     void doStuff(x){
       emitEvent(
         new TestEvent()
         ..prop = x);
     }
  +
  +  void createAMassiveObject() {
  +    var massive = new Massive();
  +    _massives.add(massive);
  +    emitEvent(
  +      new MassiveObjectCreated()
  +      ..massive = massive);
  +  }
  +
  +  void deleteAMassiveObject() {
  +    if(_massives.isNotEmpty){
  +      emitEvent(
  +        new MassiveObjectDeleted()
  +        ..massive = _massives.removeLast());
  +    }
  +  }
  +}
  +
  +class Massive extends Source{
  +  final List<double> _memoryUser = new List<double>();
  +  Massive(){
  +    var rng = new Random();
  +    try{
  +      for(var i = 0; i < 1000000; i++){
  +        _memoryUser.add(rng.nextDouble());
  +      }
  +    }on OutOfMemoryError catch(error){
  +      _memoryUser.clear();
  +      throw error;
  +    }
  +  }
   }
   
   class TestConsumer extends Consumer{
  +
  +  final List<MassiveConsumer> _massives = new List<MassiveConsumer>();
  +  int massivesToCreateToEnsureNoMemoryLeaks = 50;
  +
     TestConsumer(src):super(src){
  -    listen(src, Omni, (Event event){
  +    _addEventHandlers();
  +  }
  +
  +  _addEventHandlers(){
  +    listen(source, Omni, (Event event){
         lastEventDataCaughtByConsumer = event.data;
  +    });
  +    listen(source, MassiveObjectCreated, (Event<MassiveObjectCreated> event){
  +      _massives.add(new MassiveConsumer(event.data.massive));
  +      Timer.run((){
  +        source.deleteAMassiveObject();
  +      });
  +    });
  +    listen(source, MassiveObjectDeleted, (Event<MassiveObjectDeleted> event){
  +      var massive = _massives.singleWhere((massive) => event.data.massive == massive.source);
  +      _massives.remove(massive);
  +      massive.dispose();
  +      if(massivesToCreateToEnsureNoMemoryLeaks-- > 0){
  +        source.createAMassiveObject();
  +      }else{
  +        memoryLeakTestComplete = true;
  +      }
       });
     }
   
  
positive.code:   _purityTestTranTypesRegistered = true;
    registerTranTypes('purity.test', 'pt',(){
      registerTranSubtype('a', TestEvent);
    });
  }
  
  bool restrictedAccessMethodCalled = false;
  local.Host currentHost;
  local.ProxyEndPoint currentproxyEndPoint;
  TestSource currentTestSrc;
  TestConsumer currentTestConsumer;
  dynamic srcPassedToConsumer;
  dynamic lastErrorCaughtDuringTest;
  TestEvent lastEventDataCaughtByConsumer;
  
  void _setUp(){
  
  
negative.code:         });
        executeWhenReadyOrTimeout(
          () => currentTestConsumer != null,
          () => currentTestConsumer.callSourceMethod(#_aPrivateMethod));
      });
  
      test('calling a getter on a proxy results in an UnsupportedProxyInvocationError', (){
  