Quote Originally Posted by Rockem View Post
umm, I want to allocate number on the heap as it represent large object and I can have many of them on the list (also I move the list out of the scope)
It doesn't matter, it will work fine without pointers. Just make sure you implement the copy constructor and assign operator (unless the ones provided by the compiler are fine) and think about making your Number an implicitly shared class (see QSharedData).

so contains doesn't support pointers ? even if the object implements == ?
No, because the list contains pointers so it also compares pointers.