If you only use the object inside the disposeSession method, you have to dispose of it there. Only class variables should be disposed by implementing IDisposable.
At the end of disposeSession method, add the folloing code to dispose of it, if it implements IDisposable.
if(toDispose is IDisposable)
(toDispose as IDisposable).Dispose();
or you can write it like this
IDisposable disposable = toDispose as IDisposable;
if( disposable != null )
disposable.Dispose();
edit Added a cast as corrected by the comments, and added the version using as and checking for null
Øyvind Bråthen
2010-09-22 10:03:15