The impact of cognitive control demands on long-term memory is mixed, with some conflicts leading to better, others leading to worse subsequent memory. The current study was designed to investigate how different types of cognitive control demands modulate the effects on memory. At study, participants had to switch between two classification tasks and later, free recall performance was assessed. The stimuli consisted of two interleaved words, one word had to be categorized and the other word had to be ignored. In four experiments, the congruency between target and ignored words was manipulated by changing the distractor category. This allowed us to investigate the impact of different types of conflict (i.e., task switching, perceptual load, response-category conflict, stimulus-category conflict). The results revealed that task switching impaired memory in all experiments. In Experiment 1, higher perceptual load also impaired memory. Experiments 2–4 showed that the co-activation of two words which required different responses (i.e., response-category conflict) enhanced memory performance but only when the conflict stimuli were presented in pure blocks. Overall, memory performance seems to depend on attentional policies. Withdrawing attention from target encoding results in lower memory performance. In contrast, focusing attention on the target results in enhanced memory performance.