|
Posted by Ivαn Sαnchez Ortega on 07/19/07 07:50
Mortimer wrote:
> I have two objects and the second one is using an instance of the
> first.
> As displayed in the example below, the Garbage Collector calls the
> destruct method of the first class before the second even if the second
> contains a reference to the other, so i can't complete all the
> operations not having all "the code available"!
If it's totally and absolutely neccesary for you to keep an order on
destroying objects, unset() them when neccesary.
Now, a question for you: Imagine we have two objects, each with a reference
to the other one (i.e. a circular dependency). Which one should the GC
destroy first??
--
----------------------------------
IvΓ‘n SΓ‘nchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
Excellent day to have a rotten day.
Navigation:
[Reply to this message]
|