You use this method to destroy the object of the link server.
CALL METHOD link_server->stop_link_server EXPORTING no_flush = no_flush IMPORTING error = error retcode = retcode.