Questions tagged [circular-reference]

A circular reference is a series of references where the last object references the first, resulting in a closed loop.

A circular reference is a series of references where the last object references the first, resulting in a closed loop.

Circular references can appear in computer programming when one piece of code requires the result from another, but that code needs the result from the first.

Information is taken from Wikipedia, more information available there.

758 questions
4
votes
1 answer

Creating tables with circular reference

How can I create multiple tables with circular references. I have this data that I'd like to create all in one shot: DROP TABLE employee CASCADE CONSTRAINTS; CREATE TABLE employee ( fname varchar2(15) not null, minit varchar2(1), lname …
4
votes
5 answers

Circular reference between class

i need develop the next diagram class: I wrote code, but, have problems of circular unit reference. The XmlFileManager Class contains: unit XmlFileManager; interface uses xmldom, XMLIntf, msxmldom, XMLDoc, SysUtils, DateUtils, Classes, Dialogs, …
ramiromd
  • 2,019
  • 8
  • 33
  • 62
4
votes
6 answers

Resolving Circular References (C#)

I'm having a couple of problems with circular reference/dependency that I've been sitting on all day. Something must be wrong with my thought process, I just don't get it. Here are my projects: Flip.Main (ASP.NET MVC) Flip.Domain (C#…
Alex
  • 75,813
  • 86
  • 255
  • 348
4
votes
1 answer

Serializing a tree object in c#

I got a simple tree structure which contains the following public class MyTree { public MyTree Parent { get; set;} public List Children {get; set;} [...] } Currently the class is much more complex, but this is the important part to my…
Ole Albers
  • 8,715
  • 10
  • 73
  • 166
4
votes
1 answer

Appcelerator and CommonJS modules (caching and circular references)

Here's the thing: I'm using the CommonJS way of making my mobile (iPhone/Android) application modular. No surprise there. But there's one thing that I just can't get my head around. CommonJS lets me create STATIC private variables, which lets me…
pancake
  • 1,923
  • 2
  • 21
  • 42
4
votes
3 answers

C# Circular Reference Impact on GC Performance

Possible Duplicate: Garbage collector and circular reference Is there any impact on GC performance if objects have a circular reference but are otherwise unattached to any root, and thus ripe for GC? Would there be any benefit in having a weak…
DanH
  • 3,772
  • 2
  • 27
  • 31
3
votes
2 answers

Defining circular references using zope.schema

I'm trying to do the following, define two classes whose instances mutually reference one another, like Users and Groups in the following exemple. A User can belong to several groups and a Group can contains several users. The actual data is stored…
kriss
  • 23,497
  • 17
  • 97
  • 116
3
votes
2 answers

Large circular reference and JVM garbage collector

Is JVM capable of finding large circular reference and collect the objects? Is there any official documentation/link which states the same? or do you have any good/bad experiences with Garbage collection of large circular references. Update link:…
18bytes
  • 5,951
  • 7
  • 42
  • 69
3
votes
1 answer

Why does protostuff corrupt objects when using generics combined with circular references?

I am using protostuff binary with circular references and generics. As a very simplistic scenario i have the following classes: public class A { private String name; private B b; public String getName() { return name; …
3
votes
2 answers

How to manage circular references in delphi units?

I am using the BeforSignup in the AfterSignup unit in order to be able to call the email variable from within AfterSignup code, finally i enbcountred a problem because i want to make a button which opens the AfterSignup window using the code : …
Rafik Bari
  • 4,867
  • 18
  • 73
  • 123
3
votes
4 answers

Why do circular references and recursion make my program fail?

I wrote this simple Prolog program. man(socrates). mortal(X) :- man(X). immortal(X) :- immortal(X). I asked it the usual questions, such as whether Socrates is a man or if Socrates is a mortal. ?- man(socrates). true. //we know…
Peter Olson
  • 139,199
  • 49
  • 202
  • 242
3
votes
4 answers

How can I resolve circular references between two instances of a class in Python?

I have two instances of a class that compete in a simulation where they try to shoot at each other. The class contains a position variable and a target variable. The second instance's target variable references the first instance's position…
Colwin
  • 33
  • 5
3
votes
1 answer

Circular reference error in dependency library

I get this when I try to run my application: > npm start Starting the development server... ts-loader: Using typescript@3.5.3 and C:\DevTools\git\ui.myavis\tsconfig.json Tried to lint…
runnerpaul
  • 5,942
  • 8
  • 49
  • 118
3
votes
1 answer

Converting circular structure to JSON starting at object with constructor 'Subscriber'

I'm getting the following error when trying to subscribe to my observable. I'm not quite certain why because I'm not using any type of Stringify (to my knowledge) in the code. It's just getting a JSON array from an api. ERROR TypeError:…
John Lee Hedge
  • 481
  • 1
  • 6
  • 9
3
votes
3 answers

How can I get all parents' parents as columns for child object in circularly referenced table?

I have a table with columns like entityID, entityName, parentID How can I write a query to return all the levels of parents for an entity as to return something like childentityname, parentlevel1name, parentlevel2name, parentLevel3name and so on I…
spaghetticowboy
  • 708
  • 1
  • 8
  • 22