Hi all, i'm trying to solve this problem.

I have a Qt object that does not inherit from QObject:
Qt Code:
  1. class A
  2. {
  3. public:
  4. A();
  5. ~A();
  6. B * bItem() const;
  7. C * cItem() const;
  8. QList<D *> dList() const;
  9. void addDItem(D*item);
  10. private:
  11. B * m_bItem;
  12. C * m_cItem;
  13. QList<D*> m_dList;
  14. };
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. #include "a.h"
  2.  
  3. A::A(){
  4. this->m_bItem = new B;
  5. this->m_cItem = new C;
  6. }
  7.  
  8. A::~A(){
  9. }
  10.  
  11. C * A::cItem() const{
  12. return this->m_cItem;
  13. }
  14.  
  15. B *A::bItem() const{
  16. return this->m_bItem;
  17. }
  18.  
  19. QList<D*> A::dList() const{
  20. return this->m_dList;
  21. }
  22.  
  23. void A::addDItem(D*item);{
  24. this->m_dList.append(item);
  25. }
To copy to clipboard, switch view to plain text mode 
I created an object A:
Qt Code:
  1. A a;
To copy to clipboard, switch view to plain text mode 
and i'm using it like a parameter in a SIGNAL\SLOT connection like this
Qt Code:
  1. connect( obj, SIGNAL( sig_message( A ) ), obj2, SLOT( slot_message( A ) ) );
To copy to clipboard, switch view to plain text mode 
All working fine in the signal\slot mechanism and i can use the A param without problems.
I saw also, when the scope of A param is finished, that the destructor of class A is called correctly.
My only question\doubt is:

how can i destroy the objects ( m_bItem , m_cItem and the list m_dList ) inside A?

They are pointers(and a list of objects pointers).
If use the delete function on those pointers the application crash.(during the emitting signal, maybe the destruction remove the object during the copy...).

Am I using a wrong pattern?

Any suggestion is appreciated.
Thanks in advance.