Beispiel #1
0
 private void EventLeakStatic_Fixed()
 {
     for (int i = 0; i < 10; i++)
     {
         var eventListenerLeak = new EventListenerLeak("EventLeakStatic_Leaked " + i);
         eventListenerLeak.SubscribeStatic();
         eventListenerLeak.UnsubscribeStatic();
     }
     OnEventLeakStaticProp();
 }
Beispiel #2
0
 private void EventLeakStatic_Leaked()
 {
     for (int i = 0; i < 10; i++)
     {
         var eventListenerLeak = new EventListenerLeak("EventLeakStatic_Leaked " + i);
         eventListenerLeak.SubscribeStatic();
         // all EventListenerLeak objects are still linked to static property
     }
     OnEventLeakStaticProp();
 }