Test SDK version: Pdf for C++ 21.6 and Cells for C++ 21.6
This is my test file :
void pdfToExcel() {
// Any pdf file
auto doc = System::MakeObject<Aspose::Pdf::Document>(u"test.pdf");
doc->Save(u"test_pdf_to_excel_out.xlsx", Aspose::Pdf::SaveFormat::Excel);
doc->FreeMemory();
doc->Dispose();
std::cout << "done.\n";
}
int WINAPI theadProc(LPVOID lpParam) {
pdfToExcel();
return 0;
}
int main()
{
// aspose.pdf=v21.6 aspose.cells=v21.6
// When loading Aspose.Cells.dll and the PDF output format is Excel, memory leaks
LoadLibrary(L"Aspose.Cells.dll");
HANDLE thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)theadProc, NULL, 0, NULL);
if (thread) {
WaitForSingleObject(thread, INFINITE);
std::cout << "Thread terminated.\n";
CloseHandle(thread);
}
system("pause");
}