I have a function wherein i have created an object for a class, to use it inside the function and return it to the calling funciton.
Myobj read(string s)
{
Myobj obj = new Myobj ();
..................
........................
return obj
}
In this case should i mandatorily dispose the object i have created.
Also when should i use destructor,dispose , finalize