Imagine the following : A -> C -> E B -> D -> E
A is ref counted, and says that theres 10 references to the object C B is ref counted, and says that theres 5 references to the object D But both C and D points to the same object ! So now you have actually 15 references to the same object. Lets say objects gone out of scope and C is now counted at 0 on A, what to do ? Deallocate C causes E to be deallocated, but, what happens at B -> D ? So what you need ? A -> Singleton -> E B -> Singleton -> E In other words, make an object that stores all bignums and decides when to allocate or deallocate then and work from that on. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal