[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: free instead of destructor
From:       Roberto Alsina <ralsina () unl ! edu ! ar>
Date:       2000-02-07 10:06:03
[Download RAW message or body]

On Mon, 7 Feb 2000, Marcos Dione wrote:

> 
> 
> On Mon, 7 Feb 2000, Roberto Alsina wrote:
> 
> > On Mon, 7 Feb 2000, Marcos Dione wrote:
> > 
> > I don't get it.
> > 
> > If the object is a null pointer, obj->free() will still segfault.
> 
> 	mmm... I think that the way Dephi does it is a static class
> member... guessing too much?

Ok, QObject::free(myobj) would indeed work.
Although I have no idea on how that method could check that the pointer is
valid, considering that delete 0 is a perfectly valid noop :-)

 ("\''/").__..-''"`-. .         Roberto Alsina
 `9_ 9  )   `-. (    ).`-._.`)  ralsina@unl.edu.ar
 (_Y_.)' ._   ) `._`.  " -.-'   Centro de Telematica
  _..`-'_..-_/ /-'_.'           Universidad Nacional del Litoral
(l)-'' ((i).' ((!.'             Santa Fe - Argentina
                                KDE Developer (MFCH)
The stone age didn't end for a lack of stone" Firoz Rasul

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic