Hello guys.
Appearantly my program has an issue with memory leak but I can't really find it, im not too much of an expert but these all seem just fine to me. At least one of the functions below has a memory issue and i just can't find it, I'd appriciate any help you can give.
$ valgrind --leak-check=full ./a.out
==2719== HEAP SUMMARY:
==2719== in use at exit: 104 bytes in 1 blocks
==2719== total heap usage: 4 allocs, 3 frees, 416 bytes allocated
==2719==
==2719== 104 bytes in 1 blocks are definitely lost in loss record 1 of 1
==2719== at 0x4C293B0: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==2719== by 0x400B0E: Vektor::Vektor(unsigned int, double) (leak.cpp:66)
==2719== by 0x400A0C: operator*(double, Vektor const&) (leak.cpp:56)
==2719== by 0x400BBF: main (leak.cpp:73)
1 2 3 4
Vektor operator*(double val, const Vektor& vec){
Vektor v; //default constructor, allocation of defSize elements
v.nElements=vec.nElements;
v.pVec=newdouble[v.nElements]; //memory leak