Faster Virtual Method Dispatch

Walter Bright newshound at digitalmars.com
Wed Apr 26 20:23:03 PDT 2006


James Dunne wrote:
> Walter Bright wrote:
>> James Dunne wrote:
>>
>>> Your example is having two trees _point_ to data within each other.  
>>> The original data is still _owned_ by the original tree which the 
>>> data resides in.  You wouldn't be swapping ownership of the data like 
>>> you're talking about.  In this system, when memory is allocated it is 
>>> assigned an owner and that ownership does not ever change.  So the 
>>> system resembles a tree (one parent only), not a directed graph.
>>
>>
>> But when this happens in the general case, I can't delete *any* of the 
>> trees.
> 
> When are you trying to delete one of these trees?

I could wait until the program finishes before deleting anything, but 
that isn't memory management.

> To which 'tree' are you referring, the data structure tree or the 
> hierarchical memory manager's tree?

The nested symbol table of the local scope of a function, for example.



More information about the Digitalmars-d mailing list