language-extensions/R/src/RExtension.cpp
//--------------------------------------------------------------------------------------------------
// Name: Cleanup
//
// Description:
//  Completely cleans up the extension
//
// Returns:
//  SQL_SUCCESS on success, else SQL_ERROR
//
Cleanup
Description:
Completely cleans up the extension


Cleanup Description : Completely cleans up the extension
SQLRETURN Cleanup()
{
	LOG("RExtension::Cleanup");
	SQLRETURN result = SQL_ERROR;
	try
	{
		REnvironment::Cleanup();
		result = SQL_SUCCESS;
	}
	catch (const exception &ex)
	{
		LOG_EXCEPTION(ex);
	}
	catch (...)
	{
		LOG_ERROR("Unexpected exception occurred in function Cleanup().");
	}
	return result;
}
SQLRETURN Cleanup ( ) { LOG ( " " ) ; SQLRETURN result = SQL_ERROR ; try { REnvironment :: Cleanup ( ) ; result = SQL_SUCCESS ; } catch ( const exception & ex ) { LOG_EXCEPTION ( ex ) ; } catch ( ... ) { LOG_ERROR ( " " ) ; } return result ; }
Name: Cleanup
Description:
Completely cleans up the extension
Name : Cleanup Description : Completely cleans up the extension
// End Embedded R - usually done by calling Rf_endEmbdeddR(0) // However, with RInside, that is not needed here. // When REnvironment::sm_embeddedREnvPtr - the unique pointer to RInside goes out of scope, // it will be destructed and that will end embeddedR. //