changed the foreign pointer wrapper finalise function to return the return value of the foreign destructor