C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
Java
Learn iOS Programming
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
6
Reply
What are circular references?
Princy Gupta
11y
3.8k
0
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
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.
Munesh Sharma
11y
0
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
Prem Ranjan
11y
0
http://stackoverflow.com/questions/8840567/garbage-collector-and-circular-reference
Pankaj Bajaj
11y
0
Refer this linkhttp://blogs.msdn.com/b/askjay/archive/2012/10/08/sequence-objects-in-sql-2012-and-sql-2008.aspx
Davin Martyn
11y
0
Hi, Refer below link http://www.c-sharpcorner.com/Forums/Thread/162018/
Khan Abrar Ahmed
11y
0
refer to this link http://www.dotnetfunda.com/interviews/show/3632/what-are-circular-references-explain-how-garbage-collection-deals-with
saurabh mittal
11y
0
What are the types of comment in C# with examples?
Can “this” be used within a static method?
Message