tst_QPointer: fix memleak
Benign, but easy to avoid by using automatic storage. Change-Id: I60a1a2e85d8c1b2d91f3f33973374afae8876340 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
parent
9dcc38b566
commit
bcda685be9
@ -345,7 +345,8 @@ void tst_QPointer::threadSafety()
|
||||
|
||||
void tst_QPointer::qvariantCast()
|
||||
{
|
||||
QPointer<QFile> tracking = new QFile;
|
||||
QFile file;
|
||||
QPointer<QFile> tracking = &file;
|
||||
tracking->setObjectName("A test name");
|
||||
QVariant v = QVariant::fromValue(tracking);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user