+ 4
C # garbage collection
Can you garbage collect static objects in C#?
6 Antworten
+ 7
Sanjay Kamath My understanding is static objects are always referenced for the life of the application and therefore not released to be garbage collected.
+ 3
David Carroll What about Session objects? 🤔
+ 3
David Carroll session_onstart to session_onend
+ 3
David Carroll Well... What is an object in an application without a Life-Cycle? 🚴
+ 2
I'm assuming you're referring to ASP.NET session state events from System.Web.
However, I'm not making the connection on what that has to do with the garbage collection on static objects in C# or my original response to this question post.
You're going to need to provide clearer context with your followup question, which was simply stated as:
"What about Session Objects?"
To which I can only respond with:
What about them?
Please put a little more effort in your question. It will go a lot smoother when seeking responses. 🤓👌
+ 1
What do you mean by session object?