IPC::Shareable takes care of creating semaphores and destroying them. At least should.
Well, looks like I missed that part from docs, somehow. Thanks for pointing out. I'll check it without destroy and let you know.
Comment on Re^2: Semaphores leaks with IPC::Shareable
The docs for destroy says that:
Use this option with care. In particular you should
not use this option in a program that will fork after binding the
data.