I think shared memory only has the same lifetime as the block, it no longer exists when the kernel is finished.