Instantiating 3rd Party abstract class

Trying to write code for opencv that I’ve implemented into UE. I get this error when i run:

Unhandled exception at 0x000007FED136617B (UE4Editor-VRProject-Win64-DebugGame.dll) in UE4Editor.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.

I’m not sure if the garbage collector has said goodbye to my object or not. Here is the relevant code:

header:

public:
cv::StereoBM* SBM;

cpp:

void ACameraDepthReader::DisparityMap()

{

NumDisparities = 100;
BlockSize = 21;
SBM = cv::StereoBM::create(NumDisparities, BlockSize);
SBM->compute(*Left, *Right, *OD);

}

It fails on compute. Pointers matrixes left,right and od seem to be fine as left and right carry my video signals and work when accessed directly. From what i’ve read the instantiating/garbage collector has not been handled correctly but the only thing ive found is:

void AddReferencedObjects(FReferenceCollector& Collector) override
{
	Collector.AddReferencedObject(SBM);
}

but this just gave me an error.
Any help would be appreciated.

After more research I might be having a similar issue as in this thread:

is there no way to protect something like this from the GC?