[Qt-interest] Manipulating QWebElement in QtConcurrent--leak warning
Yawar Amin
yawar.amin at gmail.com
Thu Sep 9 02:19:21 CEST 2010
Hi,
I'm getting this warning: `2010-09-08 20:06:58.901 qwebview[11322:6817] *** __NSAutoreleaseNoPool(): Object 0x10336b840 of class NSConcreteMapTable autoreleased with no pool in place - just leaking' while trying to change a QWebElement in a secondary thread.
I'm trying to manipulate a QWebElement object that's shown inside a QWebView (I believe the full containership structure is QWebView -> QWebPage -> QWebFrame -> QWebElement). I'm passing this QWebElement, by reference, into a function (doit) that will be run by QtConcurrent, and getting back a pointer to it from doit. Why returning a pointer? Because I know the QWebElement object is being created in main(), and will be in scope until the QtConcurrent thread finishes. I'm making sure of this by asking the Future object returned from QtConcurrent::run() for its result.
I know the only object being created here that I'm not explicitly asking for is the QWebElement that's being returned from QWebFrame::findFirstElement(), but it seems to me that this object is the same as the one in the QWebFrame, otherwise manipulating it inside doit() wouldn't change the contents that are shown in the page.
I'm attaching an example that compiles and shows what I mean probably better than I can explain it. Would appreciate if someone can give some feedback.
Thanks,
Regards,
Yawar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: application/octet-stream
Size: 1171 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100908/8c3afff8/attachment.obj
-------------- next part --------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100908/8c3afff8/attachment.bin
More information about the Qt-interest-old
mailing list