Interviews6 answers
What are circular references?
6 Answers
Garbage collection works by tracking application roots. Application roots are storage locations that contain references to objects on the managed heap (or to null). In .NET, roots are
References to global objects
References to static objects
References to static fields
References on the stack to local objects
References on the stack to object parameters passed to methods
References to objects waiting to be finalized
References in CPU registers to objects on the managed heap
The list of active roots is maintained by the CLR. The garbage collector works by looking at the objects on the managed heap and seeing which are still accessible by the application, that is, accessible via an application root. Such an object is considered to be rooted.
Now suppose that you have a parent form that contains references to child forms and these child forms contain references to the parent form. Further, suppose that the application no longer contains a references to the parent for or any of the child forms. Then, for the purposes of the garbage collector, these managed objects are no longer rooted and will be garbage collected the next time a garbage collection occurs.
Munesh SharmaPosted May 20, 2014, 10:35 PM EDT
we can define circular references like, a 'ClassLiabrary_1' references 'ClassLiabrary_2' and
after that 'ClassLiabrary_2 ' is trying to reference 'ClassLiabrary_1'.
or
Circular Reference (Object model with Loops), result when a dependent object has a property or variable that holds a reference to one of the objects that contains it.
http://msdn.microsoft.com/en-us/library/aa716190(v=vs.60).aspx
Prem RanjanPosted May 19, 2014, 6:08 AM EDT
http://stackoverflow.com/questions/8840567/garbage-collector-and-circular-reference
Pankaj BajajPosted May 13, 2014, 6:34 PM EDT
Refer this link
http://blogs.msdn.com/b/askjay/archive/2012/10/08/sequence-objects-in-sql-2012-and-sql-2008.aspx
Davin MartynPosted May 13, 2014, 7:59 AM EDT
Hi,
Refer below link
http://www.c-sharpcorner.com/Forums/Thread/162018/
Khan Abrar AhmedPosted May 12, 2014, 4:37 AM EDT
refer to this link
http://www.dotnetfunda.com/interviews/show/3632/what-are-circular-references-explain-how-garbage-collection-deals-with
saurabh mittalPosted May 9, 2014, 4:49 AM EDT




