Is it possible to create a file in memory instead of on HDD. If yes, then how?

I want to avoid creating a temporary file on the HDD for security reasons.