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.

    • 0
  • Pankaj Bajaj
    May, 2014 13

    • 0
  • Davin Martyn
    May, 2014 13

    Refer this link

    • 0
  • Khan Abrar Ahmed
    May, 2014 12

    Hi, Refer below link

    • 0
  • saurabh mittal
    May, 2014 9

    refer to this link

    • 0

Most Popular Job Functions