The gun is destroyed as well per C10.11 HOOKING UP: ...This expenditure does not itself qualify that vehicle as a moving target, but does allow Defensive First Fire opportunities against it (that Gun shares its target status and is destroyed or missed depending on the fate of the vehicle).
The procedure is the same for un-hooking, C10.12 UNHOOKING: A Stopped vehicle not in Bypass may unhook a Gun only by spending half (FRU) of its MP/MF allotment [EXC: if the Gun's M# is circled (e.g., M(6)), the vehicle must expend two-thirds (FRU) of its MP/MF allotment] under the otherwise same conditions as were necessary for hooking up (10.11).