GC vs Resource management.

via Digitalmars-d digitalmars-d at puremagic.com
Sat May 3 07:02:22 PDT 2014


On Saturday, 3 May 2014 at 13:21:04 UTC, Paulo Pinto wrote:
> C# and Java also have scoped blocks (using, 
> try-with-resources), similar to Python for resource management.

Yeah,  but it doesn't work for graphs that maintain resources, 
such as a scene graph which hold onto texture memory. 
Unfortunately, you don't want GC collection to release it either.

I think in most cases resources can either be handled by owned 
pointers or a regional GC (in this case a GC that only trace 
SceneNodePointers).


More information about the Digitalmars-d mailing list