Once a controller object is created when does it become available for garbage collection?
Once a controller object is created when does it become available for garbage collection?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Usually when no active reference to this object is detected. This is handled internally by the garbage collector and so you do not have to take care about it.
So, having this in mind, after the moment Page_Unload method is called which is hosting the controller, the garbage collector gets notified that the controller object is ready for disposal.