NXP-13977: detach session from doc comment before closing it