Back to FlowSsh Documentation

Keypair - SetDestroyHandler


__cdecl FlowSshC_Keypair_SetDestroyHandler(
  FlowSshC_Keypair* keypair,
  FlowSshC_DestroyHandler handler,
  void* handlerData);

[C] Parameters

  • keypair: FlowSshC_Keypair pointer.
  • handler: A DestroyHandler function.
  • handlerData: An application-defined value to be passed to the handler. Optional.


A destroy handler gets invoked when the associated object is being destroyed as a result of its last FlowSshC_*_Release call. This happens when both the user AND the library have released the object.
[Cpp] FlowSshCpp uses destroy handlers to delete its C++ wrapper objects from memory, and you can conveniently use the destructor of the associated object.