[fpc-devel] Improving Ref Counting

Marco van de Voort marcov at stack.nl
Sun Feb 27 14:38:47 CET 2005


[ Charset ISO-8859-1 unsupported, converting... ]
> Marco van de Voort wrote:
> >>circular refs should also be done if applicable)
> >>6) Whenever an exception is thrown, wait until its either handled or 
> >>fully propagated and then perform some garbage collection. (traverse the 
> >>single linked list of all managed objects and for each object check 
> >>whether anything that references it is still valid and delete if 
> >>appropriate).
> > 
> > 
> > I also thought immediately what Uberto already said: how do you recognize
> > a valid/invalid reference without accessing memory that is invalid in the mean
> > time.
> > 
> 
> Another possibility is for the exception handling to Null the pointers 
> on the stack if its not handled in the current subroutine.

And that will have to be guarded in a try..finally, so we are back....




More information about the fpc-devel mailing list