You've fired the last shot, depressed the magazine release and nothing happened. The magazine sticks in the frame. On the range, it's irritating; in some circumstances it could be life threatening. The magazine should always fall freely from the gun. If it doesn't, it could be due to any of several factors.
The most common cause is a grip screw that's too long. It projects through the grip screw bushing and contacts the side of the magazine. This can be easily resolved by shortening the offending screw or screws.
Occasionally the grip screw bushing extends too far into the mag well due to improper installation or failure to correctly stake the bushing. Restaking and removal of any part of the bushing projecting into the mag well can normally cure this.
The magazine catch can sometimes be the culprit. It may be defective or improperly fitted and when depressed continues to bear against the front of the magazine body. Generally this can be fixed by replacing or refitting the magazine catch.
If the stirrup of the trigger is bent or pressed inward, it can contact the magazine and hold it in place. By simply straightening the stirrup, this problem can be eliminated.
The magazine may be at fault. If the body or tube is bulged or bent, it may bind inside the frame. The best option is generally to replace the defective magazine.
Finally, some portion of the grip frame may be bent. This sometimes happens if the frame has been held with excessive pressure in a vise. Bends like this can be removed by using a properly fitted magazine well mandrel.
When properly fitted, both the grip screw bushing and the end of the grip screw are below the surface of the inside of the mag well. If improperly formed or bent, the trigger stirrup can easily bind or bear against the sides of the magazine.