Ejecting objects under memory pressure