Well, that makes sense & you're correct, Memory foam is open-cell, at least the stuff at my automotive upholstery shop is. I'm just not sure if closed cell foam is appropriate for a gun case - it is rather dense and hard (no "that's what she said" comments necessary).
I've got some closed cell foam sleeping pads for backpacking. Dense, but not hard. I think some of my cases have similar.