adspace
How garbage collection deals with circular references.
Answer Posted / Upendra
Garbage collection in C# handles circular references by marking objects as reachable if they are referenced directly or indirectly by any live object. If an object cannot be reached, it is marked as unreachable and eligible for garbage collection.nHowever, because of the issue with circular references where objects indirectly reference each other without a direct live reference, garbage collection might not immediately collect the unreferenced objects.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers