gdb backtrace:
#0 0x0040cea9 in free () from /lib/tls/i686/cmov/libc.so.6
#1 0x0033c741 in operator delete(void*) () from /usr/lib/libstdc++.so.6
#2 0x080654b6 in mesh::calculateMeanNormalsPerVertex (this=0x807d684)
at /home/brent/Desktop/protCAD/src/math/mesh.cc:230
#3 0x0805638f in buildCubes (argc=4, argv=0xbffff3e4)
at /home/brent/Desktop/protCAD/src/driver/executeCubes.cc:163
#4 main (argc=4, argv=0xbffff3e4)
at /home/brent/Desktop/protCAD/src/driver/executeCubes.cc:297
Declaration and delete
call in mesh.cc
:
vector<vector<int> > faceIndicesPerVertex (vertexArray.size());
...
delete[] &faceIndicesPerVertex; //line 230
I'm sure I have this wrong, but I've tried a few different ways of calling delete there, but none seem to compile except the above. What's the problem?