On Tue, 3 Jun 2003, Matt Fowles wrote: > Most of the ref counting systems provide for very simple ref counting > containers and, essentially, provide timely destruction for the simple > case where a variable is not placed into some more complicated > container. It seems to me that if we are worried about the simple cases > like <snip> > why not just have the compiler detect that $bar was not placed in a more > complicated container and generate the code to close $bar at end of scope. > > This will provide timely destruction in the simple and common case. For > more complex cases timely destruction will not be assured. > > Is there some glaring logical problem that I am missing here?
That's somewhat like I suggested earlier, borrowing from the hybrid Python GC (see http://arctrix.com/nas/python/gc/), but no-one replied. The difference is that the solution proposed on the page uses refcounting as the default and keep track of all "container objects" in a separate list. Dave Isa. 40:31