Circular reference
A circular reference is a cycle of direct or indirect references among objects, components, or resources, in which following the references eventually leads back to something already encountered.
Pro ASP.NET Core 7, Tenth Edition
A circular reference is a chain of object references in which an object is eventually referenced again, forming a cycle.
- How it is used
- Diagnoses JSON failures when ASP.NET Core web-service responses expose Entity Framework Core related data.
- How deep it goes
- Explains navigation-property tracking, demonstrates the failing request, and shows manually nulling back-references before serialization.
- Examples
- Uses Supplier and Product entities, an Include query, the /api/suppliers/1 endpoint, and a foreach back-reference removal.
- What you can do after
- Diagnose serialization failures and break response cycles by removing child-to-parent references before returning related data.
Read how Pro ASP.NET Core 7, Tenth Edition explains circular reference →
The Well-Grounded Python Developer: How the pros use Python and Flask
A circular reference problem is a dependency structure in which modules directly or indirectly require each other in a cycle that prevents valid importing or initialization.
- How it is used
- Prevents module-import cycles when Flask features need access to the central app instance.
- How deep it goes
- Explains the dependency structure and gives a package-and-factory remedy, without descending into Python import internals.
- Examples
- Uses a MyBlog app.py layout, a package directory tree, create_app(), and Flask command-line launch examples.
- What you can do after
- Diagnose/debug with it by recognizing import cycles and restructuring Flask code around a package and factory.
100 C++ Mistakes and How to Avoid Them
A circular reference is a cycle of object references in which objects eventually refer back to an earlier object in the cycle.
- How it is used
- Warns that shared ownership can create cycles that prevent resource deletion.
- How deep it goes
- Explains reference-count changes and weak-pointer conversion, but does not show a complete cycle-breaking rewrite.
- Examples
- Uses a deque whose nodes hold shared pointers to previous and next nodes.
- What you can do after
- Diagnose shared-pointer cycles that leak resources and consider a weak pointer to break ownership.
Read how 100 C++ Mistakes and How to Avoid Them explains circular reference →
Also covered in
- JavaScript in DepthIn early access (MEAP)
Related concepts
- Entity Framework Coreproduced by · Entity Framework Core is a cross-platform object-relational mapper for .NET that enables applications to work with databases through .NET objects and queries.
- missing valueaddressed by · A missing value is an expected data value or observation that is absent, unavailable, unknown, or inapplicable.
- reference countingcontrasts with · Reference counting is a memory-management technique that tracks references to an object or value and can reclaim it when its reference count reaches zero.
- weak referenceaddressed by · A weak reference is a non-owning reference that does not prevent its referent from being reclaimed when no strong references remain.
- exceptionproduces · An exception is a runtime signal or value representing an abnormal condition that interrupts ordinary program flow and can be handled or propagated.
- garbage collectionaddressed by · Garbage collection is an automated process that identifies and reclaims or removes memory, data, or other items no longer reachable or needed by a system.
Questions about circular reference
What is circular reference?
A circular reference is a cycle of direct or indirect references among objects, components, or resources, in which following the references eventually leads back to something already encountered.
Which Manning books explain circular reference?
Pro ASP.NET Core 7, Tenth Edition, The Well-Grounded Python Developer: How the pros use Python and Flask and 100 C++ Mistakes and How to Avoid Them.
What is the difference between circular reference and reference counting?
A circular reference is a cycle of direct or indirect references among objects, components, or resources, in which following the references eventually leads back to something already encountered. Reference counting is a memory-management technique that tracks references to an object or value and can reclaim it when its reference count reaches zero.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


