create helper class to open/close handle and create/destroy shared objects