The spear in most (non-primitive) cultures is designed for thrusting, not throwing. It doesn't make much sense to throw away a spear in the middle of a battle. Given the weight and metallic point, they are not comfortable throwing devices. There is however pictorial advice on throwing the spear from European sources dealing with judicial duels (ie you only have one person to fight).
In these sources, the spear can be seen resting over the forearm of the off hand. The first image is from the Gladiatoria group from around 1430, the translation given as;
Note the eighth play. Grab your spear for a powerful throw and decide whether you might hit him, to not throw your spear in vain. If he throws at you first, prepare to thrust your spear at him and see where you might hit him. Keep at this play as long as you can.
A similar position can be seen in Talhoffer’s Königsegg Fechtbuch (again mid-1400’s), however, the right hand appears palm down indicating a thrust or push is to be used.
It would be possible to use the forearm-rest method whilst holding something in the front hand (or if the front hand/wrist was injured perhaps).