I would like to know when the object initialized inside a method gets disposed. My assumption is when the scope of the function ends.
public void foo() {
new Object1().SomeMethod();
}
I would like to know when the object initialized inside a method gets disposed. My assumption is when the scope of the function ends.
public void foo() {
new Object1().SomeMethod();
}