Reputation: 1183
I know the concept of Object Graph (its the graphical representation of the relationship between the objects). (usage:- Garbage collection)
However, I dont know the exact Meaning and usage of Object tree.
Also I am in confusion that what could be the main difference between the Object tree and Object Graph(if any body can give the example with respect to OOPS domain then it would much more helpfull).
Upvotes: 4
Views: 1102
Reputation: 421090
To me an object graph is an ordinary collection of objects with references in between.
An object tree is pretty much the same except that the references form a tree and all point in the direction of a certain (root) object.
A quote from Wikipedia:
A directed tree is a directed graph which would be a tree if the directions on the edges were ignored. Some authors restrict the phrase to the case where the edges are all directed towards a particular vertex, or all directed away from a particular vertex
Upvotes: 4