added code to signal and release memory pressure