Internal working of struct dtors
    Benjamin Thaut 
    code at benjamin-thaut.de
       
    Wed Apr 25 05:10:16 PDT 2012
    
    
  
When looking at the output of __traits(AllMembers,) for one of my 
structs it lists me 3 destructors:
__dtor
__fieldDtor
__aggrDtor
Now I have some questions about these
1) What are they for? I figured that __dtor contains my custom dtor code 
and that both __fieldDtor and __aggrDtor call __dtor
2) On which conditions do you need to call which destructor? (assuming 
you want to destruct the struct manually)
if possible I do not want to take the route over the TypeInfo to destroy 
the struct because it introduces a indirect function call.
Kind Regards
Benjamin Thaut
    
    
More information about the Digitalmars-d
mailing list