There are a few ways to empty a gun magazine.
One way is to hold the magazine with your thumb on the top round and use your index finger to push down each round as you eject it from the bottom of the magazine.
Another way is to hold the magazine between your thumb and first 2 fingers, then use your thumb and fingers to push down each round as you eject it from the bottom of the magazine.
A third way is to hold the magazine with one hand and use your other hand to push down each round as you eject it from the bottom of the magazine. Whichever way you choose, be sure to keep your fingers clear of the magazine release button and the path of the rounds as they are ejected.