Consider an example as below

```
class B
{
   int x;
}

class A
{
     int a;
     int b;
     B b1 = new B();

     void testMethod()
     {
        for (int i = 1; i < 10; i++)
            b1 = new B();
     }
}

class MainClass //Will never close this application
{
    static void Main(object[] args)
    {
        A a1 = new A();
        a1.testMethod();
    }
}

```

In this above example am creating a new Class B object everytime in the loop. So here my question is when i assign a new object to b1, what will happen to the previous object will that be cleaned up or will it remain up memory. 

If it is not cleaning up and increasing the memory, how to clean up?