ASP.NET 'Session.Remove(key)' v/s 'Session(key) = nothing'
- by Whiskey-Tango-Foxtrot
I've seen developers use two approaches when they are done with a session object.
1) Session.Remove(key)
2) Session(key) = nothing
What is the better approach of the two above? Does Session.Remove dispose the object stored automatically?
Does the second approach depend on the garbage collector to actually free up the memory?
Thanks.