weak references

dsimcha dsimcha at yahoo.com
Wed Aug 6 07:26:55 PDT 2008


== Quote from PJP (pete.poulos at gmail.com)'s article
> Does the D garbage collector provide something similar to the "weak" references
in Java?  Weak references don't prevent the object they refer to from being
garbage collected.  If the object has been garbage collected, the weak reference
will return null.

Stupid question:  Why would you want weak references other than for circular
reference elimination with a reference counting GC?


More information about the Digitalmars-d-learn mailing list