Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
Qt Creator 3.5.1
-
None
-
64-bit OSX El Capitan, Qt 5.5.1 (Clang 6.0 (Apple), 64 bit)
Description
I have a Qt Widgets application that uses C++11. I have a very simple main.cpp that creates and uses a std::vector<std::unique_ptr<Obj>>. When I open main.cpp for edit, Qt Creator begins to consume one whole CPU. Every time I make a single-character edit, the CPU usage goes up by one CPU. Trying to quit leads it to hang, seemingly forever.
main.cpp
#include <vector> #include <memory> struct Obj { int fun() { return 1; } }; int main(int argc, char *argv[]) { std::vector<std::unique_ptr<Obj>> vec; vec.front()->fun(); return 0; }
The problem seems to only happen when I have the line vec.front()->fun(), and specifically only when I'm using the arrow operator on a unique_ptr that's in the vector.
Attachments
Issue Links
- is replaced by
-
QTCREATORBUG-15257 CPU 100% caused by unique_ptr<base_class>
-
- Closed
-