Is there a weak pointer or references in D?
    monarch_dodra 
    monarchdodra at gmail.com
       
    Fri Jan 11 14:07:44 PST 2013
    
    
  
On Friday, 11 January 2013 at 21:12:40 UTC, Era Scarecrow wrote:
>  I've tried making a weakPtr template function, however it 
> complains about a nested function call (perhaps cause it was 
> within a unittest); Shows the problem(s) on that side.
Honest question: How can you have a weak pointer in a language 
that is garbage collected?
If you mean weak pointer to manually allocated data, wouldn't 
that imply also already having a shared pointer? AFAIK D doesn't 
really have that (though it does have RefCounted).
    
    
More information about the Digitalmars-d-learn
mailing list