A tree normally is carbon-neutral. Is captures carbon when it grows then releases it when it dies and rots.
Unless you have an ecosystem that prevents rotting (e.g. an anaerobic swamp) in which case you have steady accumulation of carbon (e.g. in a form of peat, which is a fire hazard btw). When people speak of planting trees to capture carbon they rarely mean creating swamps.