in my code i have something like

Code:
FileStream fs = new Filestream("file.txt", FileMode.Open);

processFile(fs);
|
|
|
processFile(Filestream strm) {


...do something

strm.close();
}

If I am closing the stream in the function processFile(), would that actually cause any memory leak? I mean strm and fs all point to the same objects..
so techincally if i call strm.close(), the filestream itself would be closed, and strm will be destroyed on function call return since it is a local variable. And since fs refers to a closed stream, it should be picked up by the garbage collector right?

please let me know.

thnx