Problem with gen_fsm stop terminate

I used to think calling gen_fsm:send_event( FsmRef , stop ) will unregister the global name associated with it.

But experiments suggest that is not the case.

global:unregister_name( FsmRef ) seems to FIX the issue.

Also some how using rpc call on different node to gen_fsm:start_link doesn’t give error that name is already registered. Strange!