The sink who creates the delta writer may be closed while other sinks still using this delta writer. The parent profile is deconstructed and when the last sink trying to update the profile, it will meet use-after-free. To address this issue, we record the profile number in delta writer, and the last sink who close the delta writer will create and update the profile.