D 2015/2016 Vision?

Ola Fosheim Grøstad via Digitalmars-d digitalmars-d at puremagic.com
Thu Oct 8 05:10:22 PDT 2015


On Thursday, 8 October 2015 at 11:31:49 UTC, Kagamin wrote:
> cyclic graph. If you must manually verify the graph and put 
> weak references appropriately - what kind of design in that?

It's a system programming language design... If you plan your 
model before coding it is rather easy to detect cycles in the 
model. Make the primary data structure a directed acyclic graph, 
then add back pointers as weak_ptr for secondary relations.

I believe you will find the same issues in Objective-C and Swift.

Other options:

- use regional allocation (free all resources at once)

- use a local scanner (trace live resources locally to a data 
structure, then free the ones that are not referenced).



More information about the Digitalmars-d mailing list