The density of memory foam can typically keep out dust mites. But it is possible for the pests to infiltrate and settle inside a memory foam pillow (or mattress, for that matter). That’s one advantage a shredded memory foam pillow has over one with a solid core—you can usually wash and dry a shredded foam pillow, eliminating any dust mites that have taken up residence.