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 against using shared ownership in both directions when designing linked structures and managing dynamic resources.
- How deep it goes
- Explains reference-count failure and recommends weak pointers, stopping short of a complete corrected implementation.
- Examples
- Uses a deque whose nodes contain shared prev and next pointers as the concrete circular-reference example.
- What you can do after
- Diagnose ownership cycles and select unique or weak pointers to prevent shared resources from leaking.
Read how 100 C++ Mistakes and How to Avoid Them explains circular reference →
Related concepts
- 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.
- Entity Framework Coreproduced by · Entity Framework Core is a cross-platform object-relational mapping framework for .NET that enables applications to query and persist data through .NET objects and APIs.
- missing valueaddressed by · A missing value is a marker or condition indicating that an expected data value or reference 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.
- garbage collectionaddressed by · Garbage collection is an automated memory- or storage-management process that identifies objects or data no longer reachable or needed and reclaims or deletes them.
- exceptionproduces · An exception is a runtime signal or object representing an abnormal condition that interrupts ordinary program flow and may be handled or propagated.
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.


