en I will show my code if necessary~My project is sth like this:
Class A{
Q_OBJECT
public slots:
void slot();
public:
B b;
A()
} ;
Class B{
Q_OBJECT
signals:
void signal();
}
A::A()
{
connect(b,SIGNAL(signal()),this,SLOT(slot()));
}
main(){
A *a;
a=new A;
a=new A;
}
Class A{
Q_OBJECT
public slots:
void slot();
public:
B b;
A()
} ;
Class B{
Q_OBJECT
signals:
void signal();
}
A::A()
{
connect(b,SIGNAL(signal()),this,SLOT(slot()));
}
main(){
A *a;
a=new A;
a=new A;
}
To copy to clipboard, switch view to plain text mode
the pointer point to another member of class A before delete it. My question is,can the system find the former 'A' and run the slot() function without a pointer pointing to it.
Bookmarks