Context was not being cleared which could lead to memory leaks.