They release their carbon as they rot or otherwise consumed. That's why the article talks about wood in cold streams, which rots very slowly.