On Fri, 23 Feb 2001, Angus Leeming wrote:

> void FormSplash::CloseCB(FL_OBJECT * ob)
> {
>       FormSplash * pre = static_cast<FormSplash*>(ob->form->u_vdata);
>       pre->hide();
>       delete pre->dialog_;
>       pre->dialog_ = 0;
> +     // why this?
>       delete pre;
> }
> 
> This is just a pointer to the actual instantiation which is stored as 
> dialog_. Whaen dialog_ is deleted, all is Ok.

Oh.

I see.

What a weird way to ask a question !

Doesn't the "pre" delete the FormSplash object itself rather than the dialog_.
It's the equivalent of "delete this" if the CloseCB() was a non-static
member of FormSplash

john

-- 
"Anyone who says you can have a lot of widely dispersed people hack away on
 a complicated piece of code and avoid total anarchy has never managed a 
 software project."
        - Andy Tanenbaum

Reply via email to