The code looks like this:
cBoundingVolume@ pCharBV = GetBoundingVolume(); cBoundingVolume bvCopy = pCharBV;
This does not release the memory of cBoundingVolume (I am not sure of the exact script place the memory allocation takes place but can try and find out if needed) and I get a memory leak.
However,this code works just fine:
cBoundingVolume@ pCharBV = GetBoundingVolume(); cBoundingVolume bvCopy;
GetBoundingVolume is a c++ function and has this declartion:
I am guessing that the problem might be that I am not declaring the copy operator correctly?
Currently it looks like this:
RegisterOperator("cBoundingVolume &opAssign(const cBoundingVolume &in)", asMETHODPR(cBoundingVolume, operator =, (const cBoundingVolume &), cBoundingVolume &) );Do I need to do something different for it to work? (as in increasing a user count in cBoundingVolume?)
I was not sure exactly what code is needed, so just say if you need to see more in order to locate the problem!