[Ticket: 1729] Closing of context object