activity manager clear all recent and kill process in background?

-Can system destroy only one or some of my activities to recover memory?

-Will system kill the whole process of my application? Will all activities be nicely destroyed?
i'll use code but don't work 

```
    mgr.killBackgroundProcesses(p.processName);

```