Пока я исследовал исходный код Qt, я увидел, что ребята из trolltech явно используют this
ключевое слово для доступа к полю в деструкторе.
inline ~QScopedPointer()
{
T *oldD = this->d;
Cleanup::cleanup(oldD);
this->d = 0;
}
Так в чем же смысл такого использования? Есть ли какие-нибудь преимущества?
Edit: For those who vote for closing this question, I suspect that this use is for some class inheritance cases
A part of QScopedPointer class definition:
template >
class QScopedPointer