Crash when deleting smart pointer

Hi,

I am currently trying to implement the PDF-replacement feature into my programm. To start, I implemented this tutorial:

All the functions will be called sucessfully (pdf will be loaded, text will be searched and file will be saved). But when the compiler leaves the function, and are trying to delete the smart pointers, it always crashes at the destructor of the smart pointer for the TextFragmentAbsorber with error code:

HEAP[ExampleProgram.exe]: Invalid address specified to RtlValidateHeap( 000002249E520000, 00000224A2491B60 )

Do I have to call something befor the smart pointers are destroyed? Releasing the smart pointer from the object?!

Cheers

@PixelError

Could you please share the complete sample code snippet to show how you are trying to destroy the smart pointers? Please also share the screenshot of the error that you are facing. We will further proceed to assist you accordingly.