btw. here's the implementation:
Qt Code:
  1. #include "Y.h"
  2.  
  3. template<class X> Y<X>::~Y()
  4. {
  5. delete Something;
  6. }
To copy to clipboard, switch view to plain text mode 
It's defined in Y.cpp.

If I put this code inside the header file Y.h, there are no problems. If I leave the code here, I get
Qt Code:
  1. release/Z.o:Z.cpp::-1: error: undefined reference to `Y<_mytype>::~Y()'
To copy to clipboard, switch view to plain text mode 
. Z.cpp includes Y.h.