Princy Gupta
What are circular references?
By Princy Gupta in C# on May 08 2014
  • Munesh Sharma
    May, 2014 21

    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 areReferences 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.

    • 0
  • Prem Ranjan
    May, 2014 19

    we can define circular references like, a 'ClassLiabrary_1' references 'ClassLiabrary_2' and after that 'ClassLiabrary_2 ' is trying to reference 'ClassLiabrary_1'.orCircular 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

    • 0
  • Pankaj Bajaj
    May, 2014 13

    http://stackoverflow.com/questions/8840567/garbage-collector-and-circular-reference

    • 0
  • Davin Martyn
    May, 2014 13

    Refer this linkhttp://blogs.msdn.com/b/askjay/archive/2012/10/08/sequence-objects-in-sql-2012-and-sql-2008.aspx

    • 0
  • Khan Abrar Ahmed
    May, 2014 12

    Hi, Refer below link http://www.c-sharpcorner.com/Forums/Thread/162018/

    • 0
  • saurabh mittal
    May, 2014 9

    refer to this link http://www.dotnetfunda.com/interviews/show/3632/what-are-circular-references-explain-how-garbage-collection-deals-with

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS