destructors

Bruno Medeiros brunodomedeiros+spam at com.gmail
Thu May 3 03:50:50 PDT 2007


Jarrett Billingsley wrote:
> "Bill Baxter" <dnewsgroup at billbaxter.com> wrote in message 
> news:f17iv3$1s1a$1 at digitalmars.com...
>> Ok, so we can say that generally speaking, any D code that contains a 
>> 'delete member;' in the destructor is bad code.  Right?
> 
> Any destructor which uses any reference members in any way is bad code. 

Why so? If a reference member is manually memory-managed, it's quite ok 
(and expected) to have it being deleted in the constructor, no?

-- 
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D


More information about the Digitalmars-d-learn mailing list