Questions tagged [qscopedpointer]

QScopedPointer is a class from the Qt Toolkit which stores a pointer to a dynamically allocated object, and deletes it upon destruction.

Documentation can be found here (Qt4) and here (Qt5).

18 questions
0
votes
1 answer

QVector + QScopedPointer - Invalid parameter passed to C runtime function

I have a method, which generates a huge QVector (SIZE: 354792000), and memmory is allocated/freed up dynamically, for convenience I use QScopedPointer: void someMethod(int SIZE) { chVec.reset(new QVector(SIZE)); /*doing some…
Cataract
  • 31
  • 1
  • 5
0
votes
0 answers

Using a QScopedArrayPointer of an abstract class?

Recently Qt had made some changes and we can't semantically move QScopedPointer so we can't have a QList< QScopedPointer< SomeClass> > , based on my other question. My second solution was using QScopedArrayPointer. But we cannot use these…
e3oroush
  • 3,045
  • 1
  • 17
  • 26
0
votes
0 answers

cgal the demo Polyhedron, the debugger Crashes in qscopedpointer.h

I haven't make any change in this demo, and it works fine firstly. But after lunch, I ran it again, the debugger crashed, and I got an error(below), the debugger reached this line in qscopedpointer.h: inline T *data() const { return d; …
Daniel
  • 5
  • 2
1
2