Questions tagged [cyclic-reference]

A cyclic reference is established if object A holds a reference to B while B holds a reference to A.

A cyclic reference is established if object A holds a reference to B while B holds a reference to A. This exposes a dynamic problem ("hen-vs-egg"), for instance in a programming language, to create a cyclic reference, A and B must be known prior to establishing their inter-relationship. Thus a form of temporal sequence (delay) is needed if data structures are purely functional, for example by declaring the initialization of the references lazy. Cyclic references can also pose problems to garbage collection which needs to detect that none of two objects involved in a cyclic reference are reachable any more by the rest of the code.

143 questions
0
votes
2 answers

Relationships loop with Core Data

I had a conceptual problem with Core Data. I have an entity called OBJ which has an OBJ entity in a relationship. I get very eloquent messages like "An error occured." when I test my model. For each OBJ entity, I ​​wish to define one or more ACTIONs…
berfis
  • 417
  • 4
  • 17
0
votes
4 answers

How to resolve circular dependency when using composition?

I came across some situation like shown below, where each class needs the other class and it creates the cyclic dependency. I came across this type of situation while wrapping some C code using ctypes. There already are lots of post on this topic…
0
votes
1 answer

Cyclic dependency error when decorating using Ninject 3.0 conventional bindings

Please see the sample code below. Its an over simplified scenario to demonstrate a problem I am encountering when binding using the WhenInjectedInto method. This has always worked with the earlier version of ninject. But some how with this upgrade…
afif
  • 460
  • 3
  • 14
0
votes
2 answers

Cyclic Constructors

Suppose structs A and B are singleton structs defined as follows: struct A { B& b_; static A& shared_a() { ... } A() : b_(B::shared_b()) { ... } }; struct B { A& a_; static B& shared_b() { ... } B() : a_(A::shared_a()) { ...…
Sam Hertz
  • 161
  • 9
-1
votes
1 answer

How do I solve this Stack Over Flow Error?

I am struggling to solve this StackOverFlow exception when I try to run my TicTacToe program. From reading the stack trace I know that the StackOverFlow error is the result of a cyclic relationship. This is because when I instantiate the miniFrame…
-1
votes
2 answers

How to convert while loop to CTE

We have a stored procedure in that procedure we are using a while loop, each time insert as a child of a parent any children of children. now this loop is taking more than 11 hours to complete.so can anyone help me to convert while loop to CTE?…
-1
votes
1 answer

JSON.stringify cyclic object n^2

I need to JSON.stringify a possibly cyclic object, which means that I have to pre-process the object and remove cycles. I'm already aware of the n^2 indexOf solution. Since that javascript doesn't seem to expose an object id or memory location, nor…
ealfonso
  • 6,622
  • 5
  • 39
  • 67
-2
votes
1 answer

I have a cycling reference in my eclipse projects

I'm making plugins requested by a server for the game Minecraft using the api Spigot In this API there's a class named Player. For the purposes of these plugins (and because it's easier) I like to make my "own player class". So there are the…
Jules
  • 346
  • 1
  • 3
  • 15
1 2 3
9
10