Just use the "Simulate memory" command in the "Equipment" menu of the simulator.
If you want to do this by code, you can use the following code (note that it is closed , so you need to remove it for AppStore releases, it is just useful for debugging)
[[UIApplication sharedApplication] _performMemoryWarning];
Both of these procedures repeat what happens when the device is in a low memory situation, so the didReceiveMemoryWarning methods will be launched.
source share