"Unnecessary Delegation Problem Example"

private static event Action SomeEvent;
 
private static void DoTest() {
    for (int i = 0; i < 10000; ++i) {
        SomeEvent += DoSomething;
        SomeEvent -= DoSomething;
    }
}
 
private static void DoSomething() { }


Code snippet taken from "Three Garbage Examples".