How to destroy a window?



Hi,

i have a class (c++) that has a pointer to another class, which has a
GtkDialog... it's something like this:

class A{
...
B *b;
...
}

A::A(){
b = new B();
}

at some point i want to destroy the data that pointer b contains:

delete(b);

the problem, is that after doing that, some time later the prog seg
fault, no gtk msg's are shown... so what i want to know, is when i want
to destroy a window, what do i have to do?

PS: because the delete(b) wasn't destroying the window, i have a
function:
b::destroy(){
gtk_widget_destroy(window);
}

PS2: i connected the destroy-event to the window of b, so when i called
gtk_widget_destroy, shouldn't it enter the callback function? it never
does...

thanks for any help,
Afonso




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]