Elements of constructor get deleted by call from another class
I am defining an array with all its elements in the constructor of one class `A`. Now I want to use these values in my other class `B`.

I am defining an Object `A *a = new A()` and call the array with `a->array` Unfortunately all the elements are deleted as soon as I am leaving the constructor from class A.
Has anyone an idea why that is so?

I am working with C++,Qt and OpenGL


Elements of constructor get deleted by call from another class
===

I am defining an array with all its elements in the constructor of one class `A`. Now I want to use these values in my other class `B`.

I am defining an Object `A *a = new A()` and call the array with `a->array` Unfortunately all the elements are deleted as soon as I am leaving the constructor from class A.
Has anyone an idea why that is so?

I am working with C++,Qt and OpenGL

