Jethro, the foam-in-a-can is urethane, which once cured does not dissolve in resin...or gasoline, or pretty much anything else.
I own a composite shop (
Dauntless Racing Cars), so here's a short primer on common foams and resins:
Urethane Foam - doesn't dissolve in anything, but breaks down under vibration loading. Cheap at low densities(<2 pcf), but increasingly expensive at higher densities (>6 pcf). Sold as tan-colored closed-cell insulation at home improvement stores.
EPS Foam - white bead-foam insulation or pink/blue insulation/float foam. Cheap at all densities, but weak and dissolves in ANY organic solvent (which includes polyester and vinylester resins, but NOT epoxy).
PVC Foam - AKA "divinycell", medium priced at low densities, and increasingly expensive at higher densities. Like white pvc pipes, pvc foam is essentially inert to practically everything, and does not break down with vibration or other loading. (Crushing is not "breaking down"...breaking down is turning into dust.)
Polyester Resin - Dirt cheap resin that is weak and stinks to high heaven from the styrene in it. Flammable.
Vinylester Resin - Fairly cheap and stinks from styrene. Stronger than polyester, but not as strong nor high-temperature tolerant as epoxy. Somewhat flammable.
Epoxy Resin - There are several types, but all true epoxies are styrene-free and so do not interact with solvents. Epoxies are potentially allergenic, so caution must be used when handling them (wear protective gloves at a minimum, and take their health and safety warnings seriously). Not flammable. Low-to-no smell.
Hope that helps!