releasing cases to save memory